jenkins-bot has submitted this change and it was merged.
Change subject: API: Correct 'from_namespace' logic in ApiQueryBacklinksprop
......................................................................
API: Correct 'from_namespace' logic in ApiQueryBacklinksprop
The code for the rdnamespace parameter to prop=redirects was trying to
use a nonexistent rd_from_namespace field when miser mode was not
enabled.
Bug: T113453
Change-Id: I7ef77a01c25fec34623b888f439261423cebdaef
---
M includes/api/ApiQueryBacklinksprop.php
1 file changed, 6 insertions(+), 2 deletions(-)
Approvals:
Umherirrender: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/api/ApiQueryBacklinksprop.php
b/includes/api/ApiQueryBacklinksprop.php
index a50d58b..f1a2271 100644
--- a/includes/api/ApiQueryBacklinksprop.php
+++ b/includes/api/ApiQueryBacklinksprop.php
@@ -143,8 +143,12 @@
}
$miser_ns = null;
if ( $params['namespace'] !== null ) {
- if ( empty( $settings['from_namespace'] ) &&
$this->getConfig()->get( 'MiserMode' ) ) {
- $miser_ns = $params['namespace'];
+ if ( empty( $settings['from_namespace'] ) ) {
+ if ( $this->getConfig()->get( 'MiserMode' ) ) {
+ $miser_ns = $params['namespace'];
+ } else {
+ $this->addWhereFld( 'page_namespace',
$params['namespace'] );
+ }
} else {
$this->addWhereFld( "{$p}_from_namespace",
$params['namespace'] );
if ( !empty( $settings['from_namespace'] ) &&
count( $params['namespace'] ) > 1 ) {
--
To view, visit https://gerrit.wikimedia.org/r/240362
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7ef77a01c25fec34623b888f439261423cebdaef
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits