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

Revision: 112261
Author:   catrope
Date:     2012-02-23 23:10:14 +0000 (Thu, 23 Feb 2012)
Log Message:
-----------
1.18wmf1: MFT r112254, r112255

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

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


Property changes on: branches/wmf/1.18wmf1/extensions/ClickTracking
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/REL1_15/phase3/extensions/ClickTracking:51646
/branches/REL1_17/phase3/extensions/ClickTracking:81445,81448
/branches/REL1_18/extensions/ClickTracking:101758,103190
/branches/new-installer/phase3/extensions/ClickTracking:43664-66004
/branches/sqlite/extensions/ClickTracking:58211-58321
/trunk/extensions/ClickTracking:99592,99653,100092,100419,100686,100692,100699,103669,104337,104736,104863,106679,107903
/trunk/phase3/extensions/ClickTracking:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93520,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95023,95042,95072-95073,95155,95327,95332,95410,95422,95426,95442,95468,95601,95812,98578,98598,98656
   + /branches/REL1_15/phase3/extensions/ClickTracking:51646
/branches/REL1_17/phase3/extensions/ClickTracking:81445,81448
/branches/REL1_18/extensions/ClickTracking:101758,103190
/branches/new-installer/phase3/extensions/ClickTracking:43664-66004
/branches/sqlite/extensions/ClickTracking:58211-58321
/trunk/extensions/ClickTracking:99592,99653,100092,100419,100686,100692,100699,103669,104337,104736,104863,106679,107903,112254
/trunk/phase3/extensions/ClickTracking:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93520,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95023,95042,95072-95073,95155,95327,95332,95410,95422,95426,95442,95468,95601,95812,98578,98598,98656

Modified: branches/wmf/1.18wmf1/extensions/ClickTracking/ClickTracking.hooks.php
===================================================================
--- branches/wmf/1.18wmf1/extensions/ClickTracking/ClickTracking.hooks.php      
2012-02-23 23:08:12 UTC (rev 112260)
+++ branches/wmf/1.18wmf1/extensions/ClickTracking/ClickTracking.hooks.php      
2012-02-23 23:10:14 UTC (rev 112261)
@@ -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.18wmf1/extensions/ClickTracking/ClickTracking.php
===================================================================
--- branches/wmf/1.18wmf1/extensions/ClickTracking/ClickTracking.php    
2012-02-23 23:08:12 UTC (rev 112260)
+++ branches/wmf/1.18wmf1/extensions/ClickTracking/ClickTracking.php    
2012-02-23 23:10:14 UTC (rev 112261)
@@ -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.18wmf1/extensions/WikiEditor
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/extensions/WikiEditor:95079,100699
   + /trunk/extensions/WikiEditor:95079,100699,112255

Modified: branches/wmf/1.18wmf1/extensions/WikiEditor/WikiEditor.hooks.php
===================================================================
--- branches/wmf/1.18wmf1/extensions/WikiEditor/WikiEditor.hooks.php    
2012-02-23 23:08:12 UTC (rev 112260)
+++ branches/wmf/1.18wmf1/extensions/WikiEditor/WikiEditor.hooks.php    
2012-02-23 23:10:14 UTC (rev 112261)
@@ -29,6 +29,9 @@
                        'modules' => array(
                                'ext.wikiEditor.toolbar',
                        ),
+                       'configurations' => array(
+                               'wgWikiEditorToolbarClickTracking',
+                       ),
                ),
                'dialogs' => array(
                        'preferences' => array(

Modified: branches/wmf/1.18wmf1/extensions/WikiEditor/WikiEditor.php
===================================================================
--- branches/wmf/1.18wmf1/extensions/WikiEditor/WikiEditor.php  2012-02-23 
23:08:12 UTC (rev 112260)
+++ branches/wmf/1.18wmf1/extensions/WikiEditor/WikiEditor.php  2012-02-23 
23:10:14 UTC (rev 112261)
@@ -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.18wmf1/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js
===================================================================
--- 
branches/wmf/1.18wmf1/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js
    2012-02-23 23:08:12 UTC (rev 112260)
+++ 
branches/wmf/1.18wmf1/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js
    2012-02-23 23:10:14 UTC (rev 112261)
@@ -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'));
                                }
                                // No dragging!
@@ -638,7 +638,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