Page MenuHomePhabricator

Special:PageAssessments with specified limit is off by one
Closed, ResolvedPublic2 Estimated Story Points


Special:PageAssessments with a specified limit is off by one. For example: shows three results, even though limit=2 is specified.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 22 2017, 4:29 AM
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptJun 22 2017, 4:30 AM
kaldari triaged this task as Medium priority.Jun 27 2017, 11:16 PM
kaldari set the point value for this task to 2.

It is specifically mentioned here ( that projects will be displayed always one more than the limit. Should we change it?

kaldari added a subscriber: kaldari.EditedJul 11 2017, 12:29 AM

To fix this, the while loop in SpecialPage::outputResults() should be changed to a for loop that only goes up to $num:

for ( $i = 0; $i < $num && $row = $res->fetchObject(); $i++ ) {
kaldari assigned this task to dmaza.Jul 11 2017, 12:36 AM
kaldari edited projects, added Community-Tech-Sprint; removed Community-Tech.

Change 364912 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/extensions/PageAssessments@master] Fix Special:PageAssessments limit bug

Change 364912 merged by jenkins-bot:
[mediawiki/extensions/PageAssessments@master] Fix Special:PageAssessments limit bug

kaldari closed this task as Resolved.Jul 13 2017, 4:52 AM
kaldari moved this task from Needs Review/Feedback to Q1 2018-19 on the Community-Tech-Sprint board.
DannyH moved this task from Estimated to Archive on the Community-Tech board.Jul 18 2017, 10:47 PM