Polybuildr has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/195034

Change subject: Exported arrow symbol image paths to mw.config
......................................................................

Exported arrow symbol image paths to mw.config

Used ResourceLoaderGetConfigVars hook to register the paths for
cgDownArrowImage and cgRightArrowImage which were being used in
CargoDrilldown.js but had not been exported to mw.config.

Bug: T91867
Change-Id: I9812118341d165c83cff24857033245d598f8d30
---
M Cargo.hooks.php
M Cargo.php
2 files changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/34/195034/1

diff --git a/Cargo.hooks.php b/Cargo.hooks.php
index b36aeab..80a593e 100644
--- a/Cargo.hooks.php
+++ b/Cargo.hooks.php
@@ -273,4 +273,18 @@
                return true;
        }
 
+       /**
+        * Called by MediaWiki's ResourceLoaderStartUpModule::getConfig()
+        * to set static (not request-specific) configuration variables
+        * @param array $vars
+       */
+       public static function onResourceLoaderGetConfigVars( array &$vars ) {
+               global $cgScriptPath;
+
+               $vars['cgDownArrowImage'] = 
"$cgScriptPath/drilldown/resources/down-arrow.png";
+               $vars['cgRightArrowImage'] = 
"$cgScriptPath/drilldown/resources/right-arrow.png";
+
+               return true;
+       }
+
 }
diff --git a/Cargo.php b/Cargo.php
index c5bcb45..4439e83 100644
--- a/Cargo.php
+++ b/Cargo.php
@@ -44,6 +44,7 @@
 $wgHooks['SkinTemplateNavigation'][] = 'CargoHooks::addPurgeCacheTab';
 $wgHooks['AdminLinks'][] = 'CargoHooks::addToAdminLinks';
 $wgHooks['PageSchemasRegisterHandlers'][] = 'CargoPageSchemas::registerClass';
+$wgHooks['ResourceLoaderGetConfigVars'][] = 
'CargoHooks::onResourceLoaderGetConfigVars';
 
 $wgMessagesDirs['Cargo'] = $dir . '/i18n';
 $wgExtensionMessagesFiles['Cargo'] = $dir . '/Cargo.i18n.php';

-- 
To view, visit https://gerrit.wikimedia.org/r/195034
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9812118341d165c83cff24857033245d598f8d30
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Polybuildr <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to