Merge "Add data-sort-value for better sorting on Special:Tags"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 24 Aug 2013 16:57:11 +0000 (16:57 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 24 Aug 2013 16:57:11 +0000 (16:57 +0000)
RELEASE-NOTES-1.22
includes/specials/SpecialTags.php

index ab08972..239d997 100644 (file)
@@ -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
index b19c6e8..6a282c9 100644 (file)
@@ -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;