From: Aryeh Gregor Date: Wed, 3 Sep 2008 00:18:11 +0000 (+0000) Subject: Style: use local variable, use else if X-Git-Tag: 1.31.0-rc.0~45519 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=895bd2fdbf7095beefa192fc58e854c43f904721;p=lhc%2Fweb%2Fwiklou.git Style: use local variable, use else if --- diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 4dbf5ba756..9a5dc13fdc 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -606,17 +606,17 @@ function ts_resortTable(lnk) { } } - sortfn = ts_sort_caseinsensitive; + var sortfn = ts_sort_caseinsensitive; if (itm.match(/^\d\d[\/. -][a-zA-Z]{3}[\/. -]\d\d\d\d$/)) sortfn = ts_sort_date; - if (itm.match(/^\d\d[\/.-]\d\d[\/.-]\d\d\d\d$/)) + else if (itm.match(/^\d\d[\/.-]\d\d[\/.-]\d\d\d\d$/)) sortfn = ts_sort_date; - if (itm.match(/^\d\d[\/.-]\d\d[\/.-]\d\d$/)) + else if (itm.match(/^\d\d[\/.-]\d\d[\/.-]\d\d$/)) sortfn = ts_sort_date; // pound dollar euro yen currency cents - if (itm.match(/(^[\u00a3$\u20ac\u00a4\u00a5]|\u00a2$)/)) + else if (itm.match(/(^[\u00a3$\u20ac\u00a4\u00a5]|\u00a2$)/)) sortfn = ts_sort_currency; - if (itm.match(/^[\d.,eE+-]+\%?$/)) + else if (itm.match(/^[\d.,eE+-]+\%?$/)) sortfn = ts_sort_numeric; var reverse = (span.getAttribute("sortdir") == 'down');