https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112254

Revision: 112254
Author:   catrope
Date:     2012-02-23 22:28:20 +0000 (Thu, 23 Feb 2012)
Log Message:
-----------
Add a configuration variable for disabling tracking of the sidebar links

Modified Paths:
--------------
    trunk/extensions/ClickTracking/ClickTracking.hooks.php
    trunk/extensions/ClickTracking/ClickTracking.php

Modified: trunk/extensions/ClickTracking/ClickTracking.hooks.php
===================================================================
--- trunk/extensions/ClickTracking/ClickTracking.hooks.php      2012-02-23 
22:26:50 UTC (rev 112253)
+++ trunk/extensions/ClickTracking/ClickTracking.hooks.php      2012-02-23 
22:28:20 UTC (rev 112254)
@@ -69,10 +69,10 @@
         * @return Boolean: always true
         */
        public static function beforePageDisplay( $out, $skin ) {
-               global $wgClickTrackThrottle;
+               global $wgClickTrackSidebar, $wgClickTrackThrottle;
                $out->addModules( 'ext.UserBuckets' );
 
-               if ( $wgClickTrackThrottle >= 0 && rand() % 
$wgClickTrackThrottle == 0 ) {
+               if ( $wgClickTrackSidebar && $wgClickTrackThrottle >= 0 && 
rand() % $wgClickTrackThrottle == 0 ) {
                        $out->addModules( 'ext.clickTracking' );
                }
                return true;

Modified: trunk/extensions/ClickTracking/ClickTracking.php
===================================================================
--- trunk/extensions/ClickTracking/ClickTracking.php    2012-02-23 22:26:50 UTC 
(rev 112253)
+++ trunk/extensions/ClickTracking/ClickTracking.php    2012-02-23 22:28:20 UTC 
(rev 112254)
@@ -31,6 +31,9 @@
 // Whether to log clicks to the database. If this is enabled and a log file is 
configured, events will be logged to both
 $wgClickTrackingDatabase = true;
 
+// If true, apply clicktracking to the links in the sidebar
+$wgClickTrackSidebar = false;
+
 /* Setup */
 
 $wgExtensionCredits['other'][] = array(


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

Reply via email to