r112261 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112260‎ | r112261 | r112262 >
Date:23:10, 23 February 2012
Author:catrope
Status:ok
Tags:
Comment:
1.18wmf1: MFT r112254, r112255
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/ClickTracking (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/ClickTracking/ClickTracking.hooks.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/ClickTracking/ClickTracking.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/WikiEditor (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/WikiEditor/WikiEditor.hooks.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/WikiEditor/WikiEditor.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/WikiEditor/WikiEditor.php
@@ -46,6 +46,10 @@
4747
4848 );
4949
 50+// If set to true and the ClickTracking extension is installed, track clicks
 51+// on the toolbar buttons
 52+$wgWikiEditorToolbarClickTracking = false;
 53+
5054 /* Setup */
5155
5256 $wgExtensionCredits['other'][] = array(
Index: branches/wmf/1.18wmf1/extensions/WikiEditor/WikiEditor.hooks.php
@@ -29,6 +29,9 @@
3030 'modules' => array(
3131 'ext.wikiEditor.toolbar',
3232 ),
 33+ 'configurations' => array(
 34+ 'wgWikiEditorToolbarClickTracking',
 35+ ),
3336 ),
3437 'dialogs' => array(
3538 'preferences' => array(
Index: branches/wmf/1.18wmf1/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js
@@ -238,7 +238,7 @@
239239 doAction : function( context, action, source ) {
240240 // Verify that this has been called from a source that's within the toolbar
241241 // 'trackAction' defined in click tracking
242 - if ( $.trackAction !== undefined && source.closest( '.wikiEditor-ui-toolbar' ).size() ) {
 242+ if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined && source.closest( '.wikiEditor-ui-toolbar' ).size() ) {
243243 // Build a unique id for this action by tracking the parent rel attributes up to the toolbar level
244244 var rels = [];
245245 var step = source;
@@ -461,7 +461,7 @@
462462 { expires: 30, path: '/' }
463463 );
464464 // Click tracking
465 - if ( $.trackAction !== undefined){
 465+ if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined ) {
466466 $.trackAction(section + '.' + $(this).attr('rel'));
467467 }
468468 // No dragging!
@@ -638,7 +638,7 @@
639639 } );
640640 }
641641 // Click tracking
642 - if ( $.trackAction !== undefined ) {
 642+ if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined ) {
643643 $.trackAction( $section.attr('rel') + '.' + ( show ? 'show': 'hide' ) );
644644 }
645645 // Save the currently visible section
Property changes on: branches/wmf/1.18wmf1/extensions/WikiEditor
___________________________________________________________________
Modified: svn:mergeinfo
646646 Merged /trunk/extensions/WikiEditor:r112255
Index: branches/wmf/1.18wmf1/extensions/ClickTracking/ClickTracking.hooks.php
@@ -69,10 +69,10 @@
7070 * @return Boolean: always true
7171 */
7272 public static function beforePageDisplay( $out, $skin ) {
73 - global $wgClickTrackThrottle;
 73+ global $wgClickTrackSidebar, $wgClickTrackThrottle;
7474 $out->addModules( 'ext.UserBuckets' );
7575
76 - if ( $wgClickTrackThrottle >= 0 && rand() % $wgClickTrackThrottle == 0 ) {
 76+ if ( $wgClickTrackSidebar && $wgClickTrackThrottle >= 0 && rand() % $wgClickTrackThrottle == 0 ) {
7777 $out->addModules( 'ext.clickTracking' );
7878 }
7979 return true;
Index: branches/wmf/1.18wmf1/extensions/ClickTracking/ClickTracking.php
@@ -31,6 +31,9 @@
3232 // Whether to log clicks to the database. If this is enabled and a log file is configured, events will be logged to both
3333 $wgClickTrackingDatabase = true;
3434
 35+// If true, apply clicktracking to the links in the sidebar
 36+$wgClickTrackSidebar = false;
 37+
3538 /* Setup */
3639
3740 $wgExtensionCredits['other'][] = array(
Property changes on: branches/wmf/1.18wmf1/extensions/ClickTracking
___________________________________________________________________
Modified: svn:mergeinfo
3841 Merged /trunk/extensions/ClickTracking:r112254

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112254Add a configuration variable for disabling tracking of the sidebar linkscatrope22:28, 23 February 2012
r112255Add a configuration variable for disabling tracking clicks on the toolbar but...catrope22:29, 23 February 2012

Status & tagging log