Last modified: 2011-03-13 18:04:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T15614, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13614 - Special:Whatlinkshere display could be sorted
Special:Whatlinkshere display could be sorted
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.13.x
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-04 15:42 UTC by Nicolas Dumazet
Modified: 2011-03-13 18:04 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
proposed patch (606 bytes, patch)
2008-04-04 15:42 UTC, Nicolas Dumazet
Details

Description Nicolas Dumazet 2008-04-04 15:42:53 UTC
Created attachment 4785 [details]
proposed patch

The actual displayed list of Special:Whatlinkshere is a bit messy, since pages are being sorted by page_id.

With the current DB structure, it seems to me that it would be costly to alter the SQL queries to sort the results in any way.

This patch performs a manual usort() on the resulting set, after it has been truncated to $limit (the number of pages to show).

It does not alter which pages are being shown on each page : It only alters the sorting display on a per page basis. Namespace first, template transclusion second : The page is now sorted by namespace, and pages where the target page is trancluded come last.

Cheers :)
Comment 1 Brion Vibber 2008-04-04 17:44:36 UTC
Well, the problem here is that there's still no ordering from page to page; sorting within the page would imply a sensible overall ordering which doesn't exist.
Comment 2 Chad H. 2008-04-10 18:41:44 UTC
Further up the page, the array is ksort()'d. What if after that was done, a normal sort ( $rows , SORT_STRING) was run to order the list before outputting it. I might be way off the mark here though.
Comment 3 Aaron Schulz 2008-05-27 04:53:36 UTC
Sorting by page_id looks fine here. Note there are also filters to only get certain inclusion/link types.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links