Clean up ApiQueryImageInfo continuation
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 1 Feb 2013 22:17:19 +0000 (17:17 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Thu, 7 Feb 2013 21:50:17 +0000 (16:50 -0500)
commit2c9dfcb7d1b527e8f472d58f507eaaaade71bb2a
tree4b5e3e897f4c9d4db5801d60b45588d3178e47e4
parentcf07e3ca7135272da8904e8cc31a403a53a9a517
Clean up ApiQueryImageInfo continuation

Reviewing this code, I spotted a few issues:
* 'imagerepository' is added to non-images, and to images that were
  skipped this round due to iicontinue. The latter is particularly
  troublesome, as clients may wind up with an incorrect value when
  merging continued results.
* Say two images are being queried, A.jpg and B.jpg. If the query needs
  to be continued somewhere in the middle of A.jpg's old versions, but
  then A.jpg is deleted before the client sends the continuation query,
  it will start in the middle of B.jpg's old versions instead of at the
  beginning of B.jpg's revisions.
* If the query needs to be continued somewhere in the middle of A.jpg's
  old versions, but in the continuation query some other module that is
  also being continued fills the result object, iicontinue will be
  reset to the *beginning* of A.jpg's old versions instead of preserving
  the position in the middle.

Change-Id: I08e2941010c7a70ff90b6244bfddd5ed0540fc9f
RELEASE-NOTES-1.21
includes/api/ApiQueryImageInfo.php