API: Add ApiPageSet accessors for just good and missing titles
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 26 Sep 2014 14:56:00 +0000 (10:56 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Fri, 26 Sep 2014 15:25:36 +0000 (11:25 -0400)
commit07e40d04c6596d981f4ac7a34b5d00bec83e7163
tree94fa6b791839991898d03659fb849f3664c7d0e0
parent64a954da742f49a8acb71a45f2d9175410c097e5
API: Add ApiPageSet accessors for just good and missing titles

ApiPageSet::getAllTitlesByNamespace is fine when that's what you want.
But in all existing uses in core, it's not what's actually wanted.
* ApiQueryBacklinksprop can generate wrong ORDER BY because it considers
  redirect and invalid titles that it doesn't acutally query.
* ApiQueryCategoryInfo raises a fatal error with category redirects.
* ApiQueryDuplicateFiles and ApiQueryImageInfo will add information for
  redirects, leaving them missing the standard data and missing from
  indexpageids.

What all these need is really something along the lines of
"ApiPageSet::getGoodAndMissingTitlesByNamespace". So let's add that,
plus a few similar methods for good measure.

Bug: 71337
Change-Id: I3a205057edcbc303393718e1c8bfb1f1b1f95323
includes/api/ApiPageSet.php
includes/api/ApiQueryBacklinksprop.php
includes/api/ApiQueryCategoryInfo.php
includes/api/ApiQueryDuplicateFiles.php
includes/api/ApiQueryImageInfo.php