Index: branches/resourceloader/phase3/includes/OutputPage.php |
— | — | @@ -2348,7 +2348,8 @@ |
2349 | 2349 | 'mediaWiki.loader.load( ' . FormatJson::encode( $this->getModules() ) . ' )' |
2350 | 2350 | ); |
2351 | 2351 | } |
2352 | | - // add user JS if enabled |
| 2352 | + // TODO: User Scripts should be included using the resource loader |
| 2353 | + // Add user JS if enabled |
2353 | 2354 | if( $this->isUserJsAllowed() && $wgUser->isLoggedIn() ) { |
2354 | 2355 | $action = $wgRequest->getVal( 'action', 'view' ); |
2355 | 2356 | if( $this->mTitle && $this->mTitle->isJsSubpage() && $sk->userCanPreview( $action ) ) { |
— | — | @@ -2356,12 +2357,8 @@ |
2357 | 2358 | $this->addInlineScript( $wgRequest->getText( 'wpTextbox1' ) ); |
2358 | 2359 | } else { |
2359 | 2360 | $userpage = $wgUser->getUserPage(); |
2360 | | - $names = array( 'common', $sk->getSkinName() ); |
2361 | | - foreach( $names as $name ) { |
2362 | | - $scriptpage = Title::makeTitleSafe( |
2363 | | - NS_USER, |
2364 | | - $userpage->getDBkey() . '/' . $name . '.js' |
2365 | | - ); |
| 2361 | + foreach( array( 'common', $sk->getSkinName() ) as $name ) { |
| 2362 | + $scriptpage = Title::makeTitleSafe( NS_USER, $userpage->getDBkey() . '/' . $name . '.js' ); |
2366 | 2363 | if ( $scriptpage && $scriptpage->exists() && ( $scriptpage->getLength() > 0 ) ) { |
2367 | 2364 | $userjs = $scriptpage->getLocalURL( 'action=raw&ctype=' . $wgJsMimeType ); |
2368 | 2365 | $this->addScriptFile( $userjs, $scriptpage->getLatestRevID() ); |