https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113491
Revision: 113491
Author: j
Date: 2012-03-09 17:54:20 +0000 (Fri, 09 Mar 2012)
Log Message:
-----------
compute remoteExtPath once per module
Modified Paths:
--------------
trunk/extensions/MwEmbedSupport/MwEmbedResourceManager.php
Modified: trunk/extensions/MwEmbedSupport/MwEmbedResourceManager.php
===================================================================
--- trunk/extensions/MwEmbedSupport/MwEmbedResourceManager.php 2012-03-09
17:51:10 UTC (rev 113490)
+++ trunk/extensions/MwEmbedSupport/MwEmbedResourceManager.php 2012-03-09
17:54:20 UTC (rev 113491)
@@ -93,9 +93,12 @@
global $IP, $wgEnableMwEmbedStandAlone, $wgScriptPath;
// Register all the resources with the resource loader
foreach( self::$moduleSet as $path => $modules ) {
+ //remove 'extension' prefix from path
+ $remoteExtPath = explode( '/', $path );
+ array_shift( $remoteExtPath );
+ $remoteExtPath = implode( '/', $remoteExtPath);
foreach ( $modules as $name => $resources ) {
- //remove 'extension' prefix from path
- $resources['remoteExtPath'] = implode( '/',
array_shift(explode( '/', $path )));
+ $resources['remoteExtPath'] = $remoteExtPath;
// Register the resource with MwEmbed extended
class if in standAlone resource loader mode:
if( $wgEnableMwEmbedStandAlone === true ){
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs