http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72141
Revision: 72141
Author: tparscal
Date: 2010-09-01 18:25:38 +0000 (Wed, 01 Sep 2010)
Log Message:
-----------
Added todo and formatting
Modified Paths:
--------------
branches/resourceloader/phase3/includes/OutputPage.php
Modified: branches/resourceloader/phase3/includes/OutputPage.php
===================================================================
--- branches/resourceloader/phase3/includes/OutputPage.php 2010-09-01
18:24:56 UTC (rev 72140)
+++ branches/resourceloader/phase3/includes/OutputPage.php 2010-09-01
18:25:38 UTC (rev 72141)
@@ -2348,7 +2348,8 @@
'mediaWiki.loader.load( ' . FormatJson::encode(
$this->getModules() ) . ' )'
);
}
- // add user JS if enabled
+ // TODO: User Scripts should be included using the resource
loader
+ // Add user JS if enabled
if( $this->isUserJsAllowed() && $wgUser->isLoggedIn() ) {
$action = $wgRequest->getVal( 'action', 'view' );
if( $this->mTitle && $this->mTitle->isJsSubpage() &&
$sk->userCanPreview( $action ) ) {
@@ -2356,12 +2357,8 @@
$this->addInlineScript( $wgRequest->getText(
'wpTextbox1' ) );
} else {
$userpage = $wgUser->getUserPage();
- $names = array( 'common', $sk->getSkinName() );
- foreach( $names as $name ) {
- $scriptpage = Title::makeTitleSafe(
- NS_USER,
- $userpage->getDBkey() . '/' .
$name . '.js'
- );
+ foreach( array( 'common', $sk->getSkinName() )
as $name ) {
+ $scriptpage = Title::makeTitleSafe(
NS_USER, $userpage->getDBkey() . '/' . $name . '.js' );
if ( $scriptpage &&
$scriptpage->exists() && ( $scriptpage->getLength() > 0 ) ) {
$userjs =
$scriptpage->getLocalURL( 'action=raw&ctype=' . $wgJsMimeType );
$this->addScriptFile( $userjs,
$scriptpage->getLatestRevID() );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs