Page MenuHomePhabricator

prop=imageinfo has no query-continue
Closed, ResolvedPublic


Author: Bryan.TongMinh

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.

Version: 1.12.x
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:03 PM
bzimport set Reference to bz12875.
bzimport added a subscriber: Unknown Object (MLST).

Bryan.TongMinh wrote:

Fixed myself in r30432.

(In reply to comment #1)

Fixed myself in r30432.

I don't really see how r30432 fixes this bug.

Bryan.TongMinh wrote:

Sorry, I thought I created a bug for another unrelated imageinfo problem and just clicked the top item in "My bugs"... Apparently wrong.

Bryan.TongMinh wrote:

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?

attachment bug12875.diff ignored as obsolete

Bryan.TongMinh wrote:

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 on attachment 4611
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".

Bryan.TongMinh wrote:

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 on attachment 4611
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.