r85065 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85064‎ | r85065 | r85066 >
Date:13:17, 31 March 2011
Author:demon
Status:ok
Tags:
Comment:
Fix for r85033 (for real this time): had makeGlobalVariablesScript() twice, the first one should be resourceLoaderGetConfigVars(), just like trunk. Reverts r85063.
Modified paths:
  • /branches/REL1_17/extensions/Vector/Vector.hooks.php (modified) (history)

Diff [purge]

Index: branches/REL1_17/extensions/Vector/Vector.hooks.php
@@ -130,13 +130,34 @@
131131 }
132132
133133 /**
134 - * MakeGlobalVariablesScript hook
 134+ * ResourceLoaderGetConfigVars hook
135135 *
136136 * Adds enabled/disabled switches for Vector modules
137137 */
138138 public static function resourceLoaderGetConfigVars( &$vars ) {
139139 global $wgVectorFeatures;
140140
 141+ $configurations = array();
 142+ foreach ( self::$features as $name => $feature ) {
 143+ if (
 144+ isset( $feature['configurations'] ) &&
 145+ ( !isset( $wgVectorFeatures[$name] ) || self::isEnabled( $name ) )
 146+ ) {
 147+ foreach ( $feature['configurations'] as $configuration ) {
 148+ global $$configuration;
 149+ $configurations[$configuration] = $$configuration;
 150+ }
 151+ }
 152+ }
 153+ if ( count( $configurations ) ) {
 154+ $vars = array_merge( $vars, $configurations );
 155+ }
 156+ return true;
 157+ }
 158+
 159+ public static function makeGlobalVariablesScript( &$vars ) {
 160+ global $wgVectorFeatures;
 161+
141162 // Build and export old-style wgVectorEnabledModules object for back compat
142163 $enabledModules = array();
143164 foreach ( self::$features as $name => $feature ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85033MFT more extension revs: r82601, r82654, r82698, r82755, r82756, r82759, r829...demon18:49, 30 March 2011
r85063Fix PHP Fatal error: Cannot redeclare VectorHooks::makeGlobalVariablesScript(...reedy13:04, 31 March 2011

Status & tagging log