Page MenuHomePhabricator

descending tablesort broken for negative numbers
Closed, DeclinedPublic

Description

Author: osrc-sysint

Description:
A table of type wikitable sortable that contains negative numbers is not sorted correctly when descending sorting is requested. Ascending sorting works as expected. The result looks like descending search does not recognise negative numbers as numbers, but I don't get how this is possible since ts_resortTable() in wikiprefs.js decides sorting direction after the object type is recognised.

Example:
1,-1, 0, -4, 3, -11, -7, 7, -5, 11
is sorted as
7, 3, 11, 1, 0, -7, -5, -4, -11, -1


Version: 1.10.x
Severity: minor

Details

Reference
bz15890

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:19 PM
bzimport set Reference to bz15890.
bzimport added a subscriber: Unknown Object (MLST).

osrc-sysint wrote:

correct descending table sorting for negative numbers

Attached:

MediaWiki 1.10 is no longer supported. WORKSFORME in 1.14 alpha r42593. See http://meta.wikimedia.org/wiki/Help:Sorting#Examples . I suggest you make a local patch.

osrc-sysint wrote:

Siebrand wrote:

I suggest you make a local patch.

I did. Thanks for your help.