From: Trevor Parscal Date: Thu, 21 Apr 2011 01:05:36 +0000 (+0000) Subject: Fixed bugs: Version was being checked against the wrong index after the cookie's... X-Git-Tag: 1.31.0-rc.0~30657 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=46d7b0b4d0acb9b98fe696940f04bea47032d19e;p=lhc%2Fweb%2Fwiklou.git 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. --- diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js index 206c355167..c7a64887ab 100644 --- a/resources/mediawiki/mediawiki.js +++ b/resources/mediawiki/mediawiki.js @@ -446,9 +446,9 @@ window.mediaWiki = new ( function( $ ) { // Bucket information is stored as 2 integers, together as version:bucket like: "1:2" if ( typeof cookie === 'string' && cookie.length > 2 && cookie.indexOf( ':' ) > 0 ) { var parts = cookie.split( ':' ); - if ( parts.length > 1 && parts[1] == options.version ) { + if ( parts.length > 1 && parts[0] == options.version ) { version = Number( parts[0] ); - bucket = Number( parts[1] ); + bucket = String( parts[1] ); } } if ( bucket === null ) {