r87083 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87082‎ | r87083 | r87084 >
Date:15:38, 28 April 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r86587, r86590
Modified paths:
  • /branches/wmf/1.17wmf1/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/resources/mediawiki/mediawiki.js
@@ -350,15 +350,15 @@
351351 'tracked': false,
352352 'expires': 30
353353 }, options || {} );
354 - var cookie = $.cookie( 'mw.user.bucket:' + key );
 354+ var cookie = $.cookie( 'mediaWiki.user.bucket:' + key );
355355 var bucket = null;
356356 var version = 0;
357357 // Bucket information is stored as 2 integers, together as version:bucket like: "1:2"
358358 if ( typeof cookie === 'string' && cookie.length > 2 && cookie.indexOf( ':' ) > 0 ) {
359359 var parts = cookie.split( ':' );
360 - if ( parts.length > 1 && parts[1] == options.version ) {
 360+ if ( parts.length > 1 && parts[0] == options.version ) {
361361 version = Number( parts[0] );
362 - bucket = Number( parts[1] );
 362+ bucket = String( parts[1] );
363363 }
364364 }
365365 if ( bucket === null ) {
@@ -384,11 +384,13 @@
385385 }
386386 if ( options.tracked ) {
387387 mw.loader.using( 'jquery.clickTracking', function() {
388 - $.trackAction( 'mw.user.bucket:' + key + '@' + version + ':' + bucket );
 388+ $.trackAction(
 389+ 'mediaWiki.user.bucket:' + key + '@' + version + ':' + bucket
 390+ );
389391 } );
390392 }
391393 $.cookie(
392 - 'mw.user.bucket:' + key,
 394+ 'mediaWiki.user.bucket:' + key,
393395 version + ':' + bucket,
394396 { 'path': '/', 'expires': Number( options.expires ) }
395397 );
Property changes on: branches/wmf/1.17wmf1/resources/mediawiki/mediawiki.js
___________________________________________________________________
Modified: svn:mergeinfo
396398 Merged /trunk/phase3/resources/mediawiki/mediawiki.js:r86587,86590

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86587Swtiched to using full mediaWiki prefix in cookies and events, rather than th...tparscal00:24, 21 April 2011
r86590Fixed bugs: Version was being checked against the wrong index after the cooki...tparscal01:05, 21 April 2011

Status & tagging log