Page MenuHomePhabricator

Implement (semi-)proper pagination for Special:SystemGiftManager and Special:GiftManager (+maybe other related special pages?)
Closed, ResolvedPublicBUG REPORT

Description

Special:GiftManager has a long-standing bug with pagination in that it has none; Special:SystemGiftManager is essentially code-wise the same page with a different name and other appropriate tweaks, but the differences are mostly things like i18n message key names and such.

For Special:GiftManager I hacked around the problem, as suggested by an end-user, in May 2014 in edf4b04ae2dace8a0381dd3e14ce0586059f0e71 by simply changing the previous limit of 10 gifts per page (sic; because there's no pagination, there is effectively only one "page") to 1000 gifts per page. For Special:SystemGiftManager, the limit is hard-coded to 50, which is just too low and suggests like it's original super legacy code that has never been changed...I can easily see an active wiki having more than 50 awards. In fact, the awards directory that is included with SocialProfile (as /extensions/SocialProfile/awards) which contains some default, neutral award images that sites may use (but they are not automatically used by the software) contains 55 images already! So if a site were to implement all those "suggested" awards, they'd already run into potential maintenance problems because most people are not PHP devs who like to mess around with URL parameters trying to figure out the correct URL for editing an award.

I'm really not super fond of the "social tools pagination code" that you can find all over the place in all social tools, because...well, because of exactly that — code duplication! This code is usually preceded by the comment "Build next/prev nav" and as witnessed by a quick codesearch, it truly IS all over the place. However, I'm a realist and I realize that for overall consistency as well as the ease of implementation it might still, sadly, make some sense to copy this over once more to these two special pages at least to get this particular issue fixed.

Event Timeline

Change 835110 had a related patch set uploaded (by Jack Phoenix; author: Jack Phoenix):

[mediawiki/extensions/SocialProfile@master] Semi-proper pagination for Special:SystemGiftManager and Special:GiftManager

https://gerrit.wikimedia.org/r/835110

Change 835110 merged by jenkins-bot:

[mediawiki/extensions/SocialProfile@master] Semi-proper pagination for Special:SystemGiftManager and Special:GiftManager

https://gerrit.wikimedia.org/r/835110

ashley claimed this task.