API: Fix ApiQueryBacklinks logic and use *_from_namespace
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 21 Aug 2014 17:39:27 +0000 (13:39 -0400)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 1 Oct 2014 20:23:31 +0000 (20:23 +0000)
commit4184f1a254e63c6d77a5abcdadcb81e0e3278f1b
treeadd93a3f0697b48e2785592d60134a646093fec7
parent8aaf4468411b77b3bff93302f8da5815744673ff
API: Fix ApiQueryBacklinks logic and use *_from_namespace

The original intent of this patch was to have ApiQueryBacklinks use the
*_from_namespace fields added in Icca99b6a. It does that, but in the
process several other bugs were found in the module:

* Continuation could skip pages when blredirect was used.
* The result object would be populated incorrectly if
  $wgAPIMaxResultSize was hit and blredirect was used.
* Continuation could (probably) skip or (maybe) repeat pages when
  blredirect was used and $wgAPIMaxResultSize was hit.

In the process of analyzing and fixing these problems, the code was
heavily refactored.

Change-Id: I32381c0f082d2f8e063af99ee353ae003c163c23
includes/api/ApiQueryBacklinks.php