r112263 MediaWiki - Code Review archive

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

Diff [purge]

Index: branches/wmf/1.19wmf1/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(
Index: branches/wmf/1.19wmf1/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;
Property changes on: branches/wmf/1.19wmf1/extensions/ClickTracking
___________________________________________________________________
Added: svn:mergeinfo
8080 Merged /branches/new-installer/phase3/extensions/ClickTracking:r43664-66004
8181 Merged /branches/JSTesting/extensions/ClickTracking:r100352-107913
8282 Merged /branches/REL1_15/phase3/extensions/ClickTracking:r51646
8383 Merged /branches/wmf/1.18wmf1/extensions/ClickTracking:r97508
8484 Merged /branches/REL1_17/phase3/extensions/ClickTracking:r81445,81448
8585 Merged /trunk/extensions/ClickTracking:r111043,111199,111218,111484,111575,111659-111661,111668,111670,111688,111690,111698,111713,111715,111780,111814,111947,112074,112254
8686 Merged /branches/sqlite/extensions/ClickTracking:r58211-58321
8787 Merged /trunk/phase3/extensions/ClickTracking:r111002,111029,111034,111062,111067,111076,111085,111128,111144,111251
Index: branches/wmf/1.19wmf1/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.19wmf1/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 context.fn.restoreCursorAndScrollTop();
@@ -640,7 +640,7 @@
641641 } );
642642 }
643643 // Click tracking
644 - if ( $.trackAction !== undefined ) {
 644+ if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined ) {
645645 $.trackAction( $section.attr('rel') + '.' + ( show ? 'show': 'hide' ) );
646646 }
647647 // Save the currently visible section
Index: branches/wmf/1.19wmf1/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(
Property changes on: branches/wmf/1.19wmf1/extensions/WikiEditor
___________________________________________________________________
Added: svn:mergeinfo
5357 Merged /branches/new-installer/phase3/extensions/WikiEditor:r43664-66004
5458 Merged /branches/JSTesting/extensions/WikiEditor:r100352-107913
5559 Merged /branches/REL1_15/phase3/extensions/WikiEditor:r51646
5660 Merged /branches/wmf/1.18wmf1/extensions/WikiEditor:r97508
5761 Merged /branches/REL1_17/phase3/extensions/WikiEditor:r81445,81448
5862 Merged /trunk/extensions/WikiEditor:r111043,111199,111218,111484,111575,111659-111661,111668,111670,111688,111690,111698,111713,111715,111780,111814,111947,112074,112255
5963 Merged /branches/sqlite/extensions/WikiEditor:r58211-58321
6064 Merged /trunk/phase3/extensions/WikiEditor:r111002,111029,111034,111062,111067,111076,111085,111128,111144,111251

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