r73167 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73166‎ | r73167 | r73168 >
Date:22:40, 16 September 2010
Author:tparscal
Status:ok
Tags:
Comment:
Removed dependency on global variable "wgWikiEditorIconVersion"
Modified paths:
  • /trunk/extensions/WikiEditor/WikiEditor.hooks.php (modified) (history)
  • /trunk/extensions/WikiEditor/WikiEditor.php (modified) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiEditor/WikiEditor.php
@@ -47,10 +47,6 @@
4848 'addMediaWizard' => array( 'global' => false, 'user' => false ),
4949 );
5050
51 -// Bump this each time you change an icon without renaming it
52 -// FIXME: This needs to be done dynamically
53 -$wgWikiEditorIconVersion = 0;
54 -
5551 /* Setup */
5652
5753 $wgExtensionCredits['other'][] = array(
Index: trunk/extensions/WikiEditor/WikiEditor.hooks.php
@@ -387,14 +387,6 @@
388388
389389 static $features = array(
390390
391 - /* Special features; not listed in $wgWikiEditorFeatures thus always enabled */
392 -
393 - 'global' => array(
394 - 'configurations' => array(
395 - 'wgWikiEditorIconVersion',
396 - ),
397 - ),
398 -
399391 /* Beta Features */
400392
401393 'toolbar' => array(
@@ -560,8 +552,7 @@
561553 protected static function isEnabled( $name ) {
562554 global $wgWikiEditorFeatures, $wgUser;
563555
564 - // Features not being controlled by $wgWikiEditorFeatures are always enabled, features with global set to true are
565 - // always enabled
 556+ // Features with global set to true are always enabled
566557 if ( !isset( $wgWikiEditorFeatures[$name] ) || $wgWikiEditorFeatures[$name]['global'] ) {
567558 return true;
568559 }
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.js
@@ -170,7 +170,7 @@
171171 if ( src.substr( 0, 7 ) != 'http://' && src.substr( 0, 8 ) != 'https://' && src[0] != '/' ) {
172172 src = path + src;
173173 }
174 - return src + '?' + mediaWiki.config.get( 'wgWikiEditorIconVersion' );
 174+ return src + '?' + mediaWiki.loader.version( 'jquery.wikiEditor' );
175175 },
176176 /**
177177 * Get the sprite offset for a language if available, icon for a language if available, or the default offset or icon,

Status & tagging log