r70394 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70393‎ | r70394 | r70395 >
Date:18:30, 3 August 2010
Author:dale
Status:deferred
Tags:
Comment:
sync updates from resource loader updates from mwEmbedStandAlone
Modified paths:
  • /trunk/extensions/JS2Support/mwEmbed/includes/NamedResourceLoader.php (modified) (history)
  • /trunk/extensions/JS2Support/mwEmbed/includes/noMediaWikiConfig.php (modified) (history)

Diff [purge]

Index: trunk/extensions/JS2Support/mwEmbed/includes/NamedResourceLoader.php
@@ -17,7 +17,7 @@
1818 private static $combinedLoadersJs = '';
1919
2020 // Reg Exp that supports extracting classes from loaders
21 - private static $classReplaceExp = '/mw\.addResourcePaths\s*\(\s*{(.*)}\s*\)\s*\;/siU';
 21+ private static $classReplaceExp = '/mw\.addResourcePaths\s*\(\s*{(.*)}\s*\)\s*[\;\n]/siU';
2222
2323 // Flag to specify if the javascript resource paths have been loaded.
2424 private static $classesLoaded = false;
@@ -265,11 +265,7 @@
266266 $jClassSet = FormatJson::decode( '{' . $jsvar[1] . '}', true );
267267 // Check for null json decode:
268268 if( $jClassSet == NULL ){
269 - $moduleName = ( self::$resourceParentModuleName [ $resourceName ] )
270 - ? self::$resourceParentModuleName [ $resourceName ]
271 - : ' loader set in extension ';
272 -
273 - throw new MWException( "Error could not decode javascript resource list for module:" . $moduleName ." \n" );
 269+ throw new MWException( "Error could not decode javascript resource list for module: " + self::$currentModuleName + "\n" );
274270 return false;
275271 }
276272
Index: trunk/extensions/JS2Support/mwEmbed/includes/noMediaWikiConfig.php
@@ -28,7 +28,7 @@
2929 $wgUseFileCache = true;
3030
3131 // Named paths for the script loader
32 -$wgScriptLoaderNamedPaths = array();
 32+$wgResourceLoaderNamedPaths = array();
3333
3434 //If the scriptLoader should use relative css
3535 $wgScriptLoaderRelativeCss = false;

Status & tagging log