Follow-up Improve sorting on SpecialWanted*-Pages
authorEddie Greiner-Petter <git@eddie-sh.de>
Wed, 22 Mar 2017 20:11:11 +0000 (21:11 +0100)
committerEddieGP <wikimedia.org@eddie-sh.de>
Thu, 23 Mar 2017 18:31:00 +0000 (18:31 +0000)
commit4fdfe27aa663bc4122ed853725ed52b01fb86942
treeceefd6710966ebd3e0954d292aaefe03b8bb64c8
parentac1dabf85c19370cf5b260ddc2c363e3f36d29e9
Follow-up Improve sorting on SpecialWanted*-Pages

Change the SpecialWanted*-Pages so that they do sort
1. by the number of links to a site (as is now) and
2. alphabetically for entries which have the same number of links (new)

This is a follow-up for commit 5b15728.
The previous patch was reverted because using getOrderFields and
prefixing each order field with qc_ in fetchFromCache threw DB errors in
production. This follow-up differs in introducing a new function
getCacheOrderFields that defines order fields only for fetching from the
cache and doesn't reuse getOrderFields which is for the raw query
(without cache). It returns ['value'] by default and thus keeps the
known behaviour.

Bug: T4335
Change-Id: Ic01a3c28892c78ba9a9f0a7d665937efe87b44bd
includes/specialpage/QueryPage.php
includes/specialpage/WantedQueryPage.php