From 6227c599ab2c28a047a599c763274e8186660b7b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 19 Jul 2009 21:25:47 +0000 Subject: [PATCH] * (bug 17139) ts_resortTable inconsistent trimming makes date sorting fragile Added a trim on the sort key preprocessing as well as the picking of the preprocessor --- 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 ec8564c0a5..53166590b3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -297,6 +297,7 @@ this. Was used when mwEmbed was going to be an extension. * (bug 19287) Workaround for lag on history page in Firefox 3.5 * (bug 19564) Updated docs/hooks.txt * (bug 18751) Fix for buggage in profiling setup for some extensions on PHP 5.1 +* (bug 17139) ts_resortTable inconsistent trimming makes date sorting fragile == API changes in 1.16 == diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 99ef085faf..f92db3416e 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1578,7 +1578,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches do not keep obsolete copies of global * styles. */ -$wgStyleVersion = '234'; +$wgStyleVersion = '235'; # Server-side caching: diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 8b4ab554d0..75a281a050 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -686,7 +686,7 @@ function ts_resortTable(lnk) { if((" "+row.className+" ").indexOf(" unsortable ") < 0) { var keyText = ts_getInnerText(row.cells[column]); var oldIndex = (reverse ? -j : j); - var preprocessed = preprocessor( keyText ); + var preprocessed = preprocessor( keyText.replace(/^[\s\xa0]+/, "").replace(/[\s\xa0]+$/, "") ); newRows[newRows.length] = new Array(row, preprocessed, oldIndex); } else staticRows[staticRows.length] = new Array(row, false, j-rowStart); -- 2.20.1