$titles = $pageSet->getGoodAndMissingTitles();
$map = $pageSet->getGoodAndMissingTitlesByNamespace();
+ // Add in special pages, they can theoretically have backlinks too.
+ // (although currently they only do for prop=redirects)
+ foreach ( $pageSet->getSpecialTitles() as $id => $title ) {
+ $titles[] = $title;
+ $map[$title->getNamespace()][$title->getDBkey()] = $id;
+ }
+
// Determine our fields to query on
$p = $settings['prefix'];
$hasNS = !isset( $settings['to_namespace'] );
$this->addFieldsIf( 'page_namespace', $miser_ns !== null );
if ( $hasNS ) {
- $lb = new LinkBatch( $titles );
- $this->addWhere( $lb->constructSet( $p, $db ) );
+ // Can't use LinkBatch because it throws away Special titles.
+ // And we already have the needed data structure anyway.
+ $this->addWhere( $db->makeWhereFrom2d( $map, $bl_namespace, $bl_title ) );
} else {
$where = [];
foreach ( $titles as $t ) {
public function getHelpUrls() {
$name = ucfirst( $this->getModuleName() );
- return "https://www.mediawiki.org/wiki/API:{$name}";
+ return "https://www.mediawiki.org/wiki/Special:MyLanguage/API:{$name}";
}
}