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

Revision: 112263
Author:   catrope
Date:     2012-02-23 23:10:44 +0000 (Thu, 23 Feb 2012)
Log Message:
-----------
1.19wmf1: MFT r112254, r112255

Modified Paths:
--------------
    branches/wmf/1.19wmf1/extensions/ClickTracking/ClickTracking.hooks.php
    branches/wmf/1.19wmf1/extensions/ClickTracking/ClickTracking.php
    branches/wmf/1.19wmf1/extensions/WikiEditor/WikiEditor.hooks.php
    branches/wmf/1.19wmf1/extensions/WikiEditor/WikiEditor.php
    
branches/wmf/1.19wmf1/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js

Property Changed:
----------------
    branches/wmf/1.19wmf1/extensions/ClickTracking/
    branches/wmf/1.19wmf1/extensions/WikiEditor/


Property changes on: branches/wmf/1.19wmf1/extensions/ClickTracking
___________________________________________________________________
Added: svn:mergeinfo
   + /branches/JSTesting/extensions/ClickTracking:100352-107913
/branches/REL1_15/phase3/extensions/ClickTracking:51646
/branches/REL1_17/phase3/extensions/ClickTracking:81445,81448
/branches/new-installer/phase3/extensions/ClickTracking:43664-66004
/branches/sqlite/extensions/ClickTracking:58211-58321
/branches/wmf/1.18wmf1/extensions/ClickTracking:97508
/trunk/extensions/ClickTracking:111043,111199,111218,111484,111575,111659-111661,111668,111670,111688,111690,111698,111713,111715,111780,111814,111947,112074,112254
/trunk/phase3/extensions/ClickTracking:111002,111029,111034,111062,111067,111076,111085,111128,111144,111251

Modified: branches/wmf/1.19wmf1/extensions/ClickTracking/ClickTracking.hooks.php
===================================================================
--- branches/wmf/1.19wmf1/extensions/ClickTracking/ClickTracking.hooks.php      
2012-02-23 23:10:40 UTC (rev 112262)
+++ branches/wmf/1.19wmf1/extensions/ClickTracking/ClickTracking.hooks.php      
2012-02-23 23:10:44 UTC (rev 112263)
@@ -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: branches/wmf/1.19wmf1/extensions/ClickTracking/ClickTracking.php
===================================================================
--- branches/wmf/1.19wmf1/extensions/ClickTracking/ClickTracking.php    
2012-02-23 23:10:40 UTC (rev 112262)
+++ branches/wmf/1.19wmf1/extensions/ClickTracking/ClickTracking.php    
2012-02-23 23:10:44 UTC (rev 112263)
@@ -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(


Property changes on: branches/wmf/1.19wmf1/extensions/WikiEditor
___________________________________________________________________
Added: svn:mergeinfo
   + /branches/JSTesting/extensions/WikiEditor:100352-107913
/branches/REL1_15/phase3/extensions/WikiEditor:51646
/branches/REL1_17/phase3/extensions/WikiEditor:81445,81448
/branches/new-installer/phase3/extensions/WikiEditor:43664-66004
/branches/sqlite/extensions/WikiEditor:58211-58321
/branches/wmf/1.18wmf1/extensions/WikiEditor:97508
/trunk/extensions/WikiEditor:111043,111199,111218,111484,111575,111659-111661,111668,111670,111688,111690,111698,111713,111715,111780,111814,111947,112074,112255
/trunk/phase3/extensions/WikiEditor:111002,111029,111034,111062,111067,111076,111085,111128,111144,111251

Modified: branches/wmf/1.19wmf1/extensions/WikiEditor/WikiEditor.hooks.php
===================================================================
--- branches/wmf/1.19wmf1/extensions/WikiEditor/WikiEditor.hooks.php    
2012-02-23 23:10:40 UTC (rev 112262)
+++ branches/wmf/1.19wmf1/extensions/WikiEditor/WikiEditor.hooks.php    
2012-02-23 23:10:44 UTC (rev 112263)
@@ -29,6 +29,9 @@
                        'modules' => array(
                                'ext.wikiEditor.toolbar',
                        ),
+                       'configurations' => array(
+                               'wgWikiEditorToolbarClickTracking',
+                       ),
                ),
                'dialogs' => array(
                        'preferences' => array(

Modified: branches/wmf/1.19wmf1/extensions/WikiEditor/WikiEditor.php
===================================================================
--- branches/wmf/1.19wmf1/extensions/WikiEditor/WikiEditor.php  2012-02-23 
23:10:40 UTC (rev 112262)
+++ branches/wmf/1.19wmf1/extensions/WikiEditor/WikiEditor.php  2012-02-23 
23:10:44 UTC (rev 112263)
@@ -46,6 +46,10 @@
 
 );
 
+// If set to true and the ClickTracking extension is installed, track clicks
+// on the toolbar buttons
+$wgWikiEditorToolbarClickTracking = false;
+
 /* Setup */
 
 $wgExtensionCredits['other'][] = array(

Modified: 
branches/wmf/1.19wmf1/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js
===================================================================
--- 
branches/wmf/1.19wmf1/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js
    2012-02-23 23:10:40 UTC (rev 112262)
+++ 
branches/wmf/1.19wmf1/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js
    2012-02-23 23:10:44 UTC (rev 112263)
@@ -238,7 +238,7 @@
        doAction : function( context, action, source ) {
                // Verify that this has been called from a source that's within 
the toolbar
                // 'trackAction' defined in click tracking
-               if ( $.trackAction !== undefined && source.closest( 
'.wikiEditor-ui-toolbar' ).size() ) {
+               if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && 
$.trackAction !== undefined && source.closest( '.wikiEditor-ui-toolbar' 
).size() ) {
                        // Build a unique id for this action by tracking the 
parent rel attributes up to the toolbar level
                        var rels = [];
                        var step = source;
@@ -461,7 +461,7 @@
                                        { expires: 30, path: '/' }
                                );
                                // Click tracking
-                               if ( $.trackAction !== undefined){
+                               if ( mw.config.get( 
'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined ) {
                                        $.trackAction(section + '.' + 
$(this).attr('rel'));
                                }
                                context.fn.restoreCursorAndScrollTop();
@@ -640,7 +640,7 @@
                                                        } );
                                        }
                                        // Click tracking
-                                       if ( $.trackAction !== undefined ) {
+                                       if ( mw.config.get( 
'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined ) {
                                                $.trackAction( 
$section.attr('rel') + '.' + ( show ? 'show': 'hide' )  );
                                        }
                                        // Save the currently visible section


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

Reply via email to