r83226 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83225‎ | r83226 | r83227 >
Date:18:11, 4 March 2011
Author:tparscal
Status:ok
Tags:
Comment:
Track people being added to a bucket, if the bucket will be tracked.
Modified paths:
  • /trunk/extensions/Vector/modules/ext.vector.sectionEditLinks.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Vector/modules/ext.vector.sectionEditLinks.js
@@ -8,11 +8,16 @@
99 if ( bucket === null ) {
1010 // Percentage chance of being tracked
1111 var odds = Math.min( 100, Math.max( 0,
12 - Number( mw.config.get( 'wgVectorSectionEditLinksLotteryOdds', 0 ) )
 12+ Number( mw.config.get( 'wgVectorSectionEditLinksLotteryOdds', 0 ) )
1313 ) );
1414 // 0 = not tracked, 1 = tracked with old version, 2 = tracked with new version
1515 bucket = ( Math.random() * 100 ) < odds ? Number( Math.random() < 0.5 ) + 1 : 0;
1616 $.cookie( 'ext.vector.sectionEditLinks-bucket', bucket );
 17+ // If we are going to track this person from now on, let's also track which bucket we put
 18+ // them into and when
 19+ if ( bucket > 0 && 'trackActionWithInfo' in $ ) {
 20+ $.trackActionWithInfo( 'ext.vector.sectionEditLinks-bucket', bucket );
 21+ }
1722 }
1823 }
1924 if ( bucket ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r836001.17wmf1: Merge Vector edit section links module plus required ClickTracking ...catrope18:55, 9 March 2011

Status & tagging log