r86579 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86578‎ | r86579 | r86580 >
Date:00:02, 21 April 2011
Author:tparscal
Status:ok
Tags:
Comment:
Fixed mismatched cookie names, changed to using ":" instead of "-" between cookie basename and bucketing key to help make the cookie more readable and removed some extra space in an error message.
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -440,7 +440,7 @@
441441 'tracked': false,
442442 'expires': 30
443443 }, options || {} );
444 - var cookie = $.cookie( 'mw.user.bucket-' + key );
 444+ var cookie = $.cookie( 'mw.user.bucket:' + key );
445445 var bucket = null;
446446 var version = 0;
447447 // Bucket information is stored as 2 integers, together as version:bucket like: "1:2"
@@ -453,7 +453,7 @@
454454 }
455455 if ( bucket === null ) {
456456 if ( !$.isPlainObject( options.buckets ) ) {
457 - throw 'Invalid buckets error. Object expected for options.buckets .';
 457+ throw 'Invalid buckets error. Object expected for options.buckets.';
458458 }
459459 version = Number( options.version );
460460 // Find range
@@ -474,11 +474,11 @@
475475 }
476476 if ( options.tracked ) {
477477 mw.loader.using( 'jquery.clickTracking', function() {
478 - $.trackAction( 'mw.user.bucket-' + key + '@' + version + ':' + bucket );
 478+ $.trackAction( 'mw.user.bucket:' + key + '@' + version + ':' + bucket );
479479 } );
480480 }
481481 $.cookie(
482 - 'mw.userBuckets-' + key,
 482+ 'mw.user.bucket:' + key,
483483 version + ':' + bucket,
484484 { 'path': '/', 'expires': Number( options.expires ) }
485485 );

Follow-up revisions

RevisionCommit summaryAuthorDate
r870201.17wmf1: MFT r86577, r86579, r86657catrope17:30, 27 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86577Added generic bucketing feature to the user object, which handles bucketing u...tparscal23:58, 20 April 2011

Status & tagging log