From: umherirrender Date: Wed, 21 Aug 2013 15:40:06 +0000 (+0200) Subject: Add data-sort-value for better sorting on Special:Tags X-Git-Tag: 1.31.0-rc.0~18888^2 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=4b5cb741dc266dd6394aeca905edd48fd2b68f0d;p=lhc%2Fweb%2Fwiklou.git Add data-sort-value for better sorting on Special:Tags Due to the word "change" within the cell of the hitcounters, the tablesorter does not detect a number type. Adding the raw hitcounter as sort-value lets the tablesorter choose the number sorting. Bug: 51742 Change-Id: I6704e73fdd1f5c2744e18251d8b9ef0f68938841 --- diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index ab089727ca..239d997b8e 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -269,6 +269,7 @@ production. * (bug 39012) File types with a mime that we do not know the extension for can no longer be uploaded as an extension that we do know the mime type for. +* (bug 51742) Add data-sort-value for better sorting of hitcounts Special:Tags === API changes in 1.22 === * (bug 25553) The JSON output formatter now leaves forward slashes unescaped diff --git a/includes/specials/SpecialTags.php b/includes/specials/SpecialTags.php index b19c6e8600..6a282c9dad 100644 --- a/includes/specials/SpecialTags.php +++ b/includes/specials/SpecialTags.php @@ -89,9 +89,10 @@ class SpecialTags extends SpecialPage { } $newRow .= Xml::tags( 'td', null, $desc ); - $hitcount = $this->msg( 'tags-hitcount' )->numParams( $hitcount )->escaped(); - $hitcount = Linker::link( SpecialPage::getTitleFor( 'Recentchanges' ), $hitcount, array(), array( 'tagfilter' => $tag ) ); - $newRow .= Xml::tags( 'td', null, $hitcount ); + $hitcountLabel = $this->msg( 'tags-hitcount' )->numParams( $hitcount )->escaped(); + $hitcountLink = Linker::link( SpecialPage::getTitleFor( 'Recentchanges' ), $hitcountLabel, array(), array( 'tagfilter' => $tag ) ); + // add raw $hitcount for sorting, because tags-hitcount contains numbers and letters + $newRow .= Xml::tags( 'td', array( 'data-sort-value' => $hitcount ), $hitcountLink ); $doneTags[] = $tag;