r86590 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86589‎ | r86590 | r86591 >
Date:01:05, 21 April 2011
Author:tparscal
Status:ok
Tags:
Comment:
Fixed bugs: Version was being checked against the wrong index after the cookie's "version:bucket" content was parsed, causing it to never match. Bucket names were being converted into numbers, resulting in NaN usually.
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -446,9 +446,9 @@
447447 // Bucket information is stored as 2 integers, together as version:bucket like: "1:2"
448448 if ( typeof cookie === 'string' && cookie.length > 2 && cookie.indexOf( ':' ) > 0 ) {
449449 var parts = cookie.split( ':' );
450 - if ( parts.length > 1 && parts[1] == options.version ) {
 450+ if ( parts.length > 1 && parts[0] == options.version ) {
451451 version = Number( parts[0] );
452 - bucket = Number( parts[1] );
 452+ bucket = String( parts[1] );
453453 }
454454 }
455455 if ( bucket === null ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r870831.17wmf1: MFT r86587, r86590catrope15:38, 28 April 2011

Status & tagging log