r57979 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57978‎ | r57979 | r57980 >
Date:16:53, 21 October 2009
Author:catrope
Status:ok
Tags:
Comment:
ClickTracking: Add style version variable
Modified paths:
  • /trunk/extensions/UsabilityInitiative/ClickTracking/ClickTracking.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/ClickTracking/ClickTracking.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/ClickTracking/ClickTracking.hooks.php
@@ -53,12 +53,12 @@
5454 * Adds JavaScript
5555 */
5656 public static function addJS() {
57 - global $wgOut;
 57+ global $wgOut, $wgClickTrackingStyleVersion;
5858
5959 // For now, ClickTracking only makes sense when other usability
6060 // extensions are enabled
6161 //UsabilityInitiativeHooks::initialize();
62 - UsabilityInitiativeHooks::addScript( 'ClickTracking/ClickTracking.js' );
 62+ UsabilityInitiativeHooks::addScript( 'ClickTracking/ClickTracking.js', $wgClickTrackingStyleVersion );
6363 UsabilityInitiativeHooks::addVariables(
6464 array(
6565 'wgTrackingToken' => ClickTrackingHooks::get_session_id(),
Index: trunk/extensions/UsabilityInitiative/ClickTracking/ClickTracking.php
@@ -18,6 +18,9 @@
1919
2020 /* Configuration */
2121
 22+// Increment this value when you change ClickTracking.js
 23+$wgClickTrackingStyleVersion = 0;
 24+
2225 // click throttle, should be seen as "1 out of every $wgClickTrackThrottle users will have it enabled"
2326 // setting this to 1 means all users will have it enabled
2427 // setting to a negative number will disable it for all users

Status & tagging log