[MediaWiki-commits] [Gerrit] Don't register ResourceLoaderFileModule objects - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: Don't register ResourceLoaderFileModule objects .. Don't register ResourceLoaderFileModule objects Instead just register the definition array Bug: 71768 Change-Id: I2ff9b4f2d10170a397e6c651d83d907ce417df1f --- M UploadWizardHooks.php 1 file changed, 3 insertions(+), 4 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php index 0202f06..c6cbc3e 100644 --- a/UploadWizardHooks.php +++ b/UploadWizardHooks.php @@ -656,12 +656,11 @@ * Adds modules to ResourceLoader * * @param ResourceLoader $resourceLoader +* @return bool */ public static function resourceLoaderRegisterModules( &$resourceLoader ) { - global $wgExtensionAssetsPath, $wgAPIModules; + global $wgAPIModules; - $localpath = dirname( __FILE__ ); - $remotepath = "$wgExtensionAssetsPath/UploadWizard"; if ( array_key_exists( 'titleblacklist', $wgAPIModules ) ) { self::$modules['ext.uploadWizard']['dependencies'][] = 'mediawiki.api.titleblacklist'; } @@ -685,7 +684,7 @@ foreach ( self::$modules as $name => $resources ) { $resourceLoader->register( $name, - new ResourceLoaderFileModule( $resources, $localpath, $remotepath ) + $resources + array( 'localBasePath' => __DIR__, 'remoteExtPath' => 'UploadWizard' ) ); } -- To view, visit https://gerrit.wikimedia.org/r/166202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2ff9b4f2d10170a397e6c651d83d907ce417df1f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Gilles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't register ResourceLoaderFileModule objects - change (mediawiki...UploadWizard)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/166202 Change subject: Don't register ResourceLoaderFileModule objects .. Don't register ResourceLoaderFileModule objects Instead just register the definition array Bug: 71768 Change-Id: I2ff9b4f2d10170a397e6c651d83d907ce417df1f --- M UploadWizardHooks.php 1 file changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/02/166202/1 diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php index 0202f06..c6cbc3e 100644 --- a/UploadWizardHooks.php +++ b/UploadWizardHooks.php @@ -656,12 +656,11 @@ * Adds modules to ResourceLoader * * @param ResourceLoader $resourceLoader +* @return bool */ public static function resourceLoaderRegisterModules( &$resourceLoader ) { - global $wgExtensionAssetsPath, $wgAPIModules; + global $wgAPIModules; - $localpath = dirname( __FILE__ ); - $remotepath = "$wgExtensionAssetsPath/UploadWizard"; if ( array_key_exists( 'titleblacklist', $wgAPIModules ) ) { self::$modules['ext.uploadWizard']['dependencies'][] = 'mediawiki.api.titleblacklist'; } @@ -685,7 +684,7 @@ foreach ( self::$modules as $name => $resources ) { $resourceLoader->register( $name, - new ResourceLoaderFileModule( $resources, $localpath, $remotepath ) + $resources + array( 'localBasePath' => __DIR__, 'remoteExtPath' => 'UploadWizard' ) ); } -- To view, visit https://gerrit.wikimedia.org/r/166202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ff9b4f2d10170a397e6c651d83d907ce417df1f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits