From 7f6c911e42b432f1db0ba447fdc5e134d7e7a167 Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Fri, 2 Nov 2007 11:54:01 +0000 Subject: [PATCH] Remove all commas when parsing float numbers in sorted tables, patch from enwiki MediaWiki:Common.js by the user Patrick --- RELEASE-NOTES | 1 + includes/DefaultSettings.php | 2 +- skins/common/wikibits.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2b1f26af66..9155bbe98b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -127,6 +127,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 11795) Be more paranoid about confirming accept-encoding header is present * (bug 11809) Use formatNum() for more numbers * (bug 11818) Fix native language name of Inuktitut (iu) +* Remove all commas when parsing float numbers in sorted tables === API changes in 1.12 === diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 7339fafcbf..f32e9d1be4 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1215,7 +1215,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches don't keep obsolete copies of global * styles. */ -$wgStyleVersion = '100'; +$wgStyleVersion = '101'; # Server-side caching: diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 11ede270fe..a04ca2c5ba 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -1146,7 +1146,7 @@ function ts_dateToSortKey(date) { function ts_parseFloat(num) { if (!num) return 0; - num = parseFloat(num.replace(/,/, "")); + num = parseFloat(num.replace(/,/g, "")); return (isNaN(num) ? 0 : num); } -- 2.20.1