From c7bccd3a8c6092f8f1fc464139f98127d4857caf Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Fri, 24 May 2019 09:19:49 -0400 Subject: [PATCH] API: Apply miser-mode namespace check for generator=redirects Bug: T224246 Change-Id: Icad65fcc14ad91d302c8285e08d6a7ea299a90c6 --- includes/api/ApiQueryBacklinksprop.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/api/ApiQueryBacklinksprop.php b/includes/api/ApiQueryBacklinksprop.php index f04ac663ce..b8672ee6b7 100644 --- a/includes/api/ApiQueryBacklinksprop.php +++ b/includes/api/ApiQueryBacklinksprop.php @@ -334,6 +334,12 @@ class ApiQueryBacklinksprop extends ApiQueryGeneratorBase { $this->setContinue( $row, $sortby ); break; } + + if ( $miser_ns !== null && !in_array( $row->page_namespace, $miser_ns ) ) { + // Miser mode namespace check + continue; + } + $titles[] = Title::makeTitle( $row->page_namespace, $row->page_title ); } $resultPageSet->populateFromTitles( $titles ); -- 2.20.1