Last modified: 2008-02-03 19:03:23 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 T14875, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12875 - prop=imageinfo has no query-continue
prop=imageinfo has no query-continue
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.12.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-02 12:19 UTC by Bryan Tong Minh
Modified: 2008-02-03 19:03 UTC (History)
1 user (show)

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


Attachments
Proposed not working patch (1.04 KB, patch)
2008-02-02 21:08 UTC, Bryan Tong Minh
Details
Updated patch (1.92 KB, patch)
2008-02-02 21:34 UTC, Bryan Tong Minh
Details

Description Bryan Tong Minh 2008-02-02 12:19:43 UTC
prop=imageinfo has no query-continue to determine the new values of iistart and iiend. For clients it is preferable to have all property generators behave the same way. Therefore prop=imageinfo should return a query-continue similarly to prop=revisions.
Comment 1 Bryan Tong Minh 2008-02-02 17:01:23 UTC
Fixed myself in r30432.
Comment 2 Roan Kattouw 2008-02-02 19:13:04 UTC
(In reply to comment #1)
> Fixed myself in r30432.
> 

I don't really see how r30432 fixes this bug.
Comment 3 Bryan Tong Minh 2008-02-02 20:36:07 UTC
Sorry, I thought I created a bug for another unrelated imageinfo problem and just clicked the top item in "My bugs"... Apparently wrong.
Comment 4 Bryan Tong Minh 2008-02-02 21:08:12 UTC
Created attachment 4610 [details]
Proposed not working patch

Proposed patch. The problem however is that iistart is apparently evaluated with the boundary excluded, so this patch will skip one item for each iteration. This could be fixed by adding +1 to the continue parameter, but should maybe be changed in the backend?
Comment 5 Bryan Tong Minh 2008-02-02 21:34:43 UTC
Created attachment 4611 [details]
Updated patch

This patch changes the behaviour of the backend LocalFile.

I checked and no other functions in the core are affected by this change.
Comment 6 Roan Kattouw 2008-02-02 22:17:18 UTC
Comment on attachment 4611 [details]
Updated patch

The normal way of doing is simply to fetch $limit+1 revisions and returning the last one's timestamp as query-continue value. No need to change the backend. Look at any list module (like ApiQueryAllpages) and search for "the one extra".
Comment 7 Bryan Tong Minh 2008-02-02 22:28:40 UTC
I know that. Patch #4611 actually does that, and returns a new iistart value. However, getHistory(limit, start, end) will return all items between start and end, excluding the boundaries. One way to solve that is by adding 1 to the query-continue values, but that is imho an ugly solution, since there is no reason why getHistory would not include start and end.
Comment 8 Roan Kattouw 2008-02-02 22:31:54 UTC
Comment on attachment 4611 [details]
Updated patch

Ah, I see. I'll look into getting this to work tomorrow evening or, if I won't have time then, on Monday.
Comment 9 Roan Kattouw 2008-02-03 19:03:23 UTC
Patch applied in r30483.

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


Navigation
Links