Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/63288
Change subject: Do not returning external title in ApiPageSet::getRedirectTargets ...................................................................... Do not returning external title in ApiPageSet::getRedirectTargets Having a page with a redirect to "en:Main Page" will be added as "Main Page" to the output, that is wrong http://test.wikipedia.org/w/api.php?action=query&titles=Redirect%20to%20interwiki%20page&redirects Change-Id: I7b59f592c1293dbb96f4c4279201bf04fcfea29d --- M includes/api/ApiPageSet.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/88/63288/1 diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index 3caf81f..3c81108 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -862,7 +862,7 @@ $from = $this->mPendingRedirectIDs[$rdfrom]->getPrefixedText(); $to = Title::makeTitle( $row->rd_namespace, $row->rd_title, $row->rd_fragment, $row->rd_interwiki ); unset( $this->mPendingRedirectIDs[$rdfrom] ); - if ( !isset( $this->mAllPages[$row->rd_namespace][$row->rd_title] ) ) { + if ( !$to->isExternal() && !isset( $this->mAllPages[$row->rd_namespace][$row->rd_title] ) ) { $lb->add( $row->rd_namespace, $row->rd_title ); } $this->mRedirectTitles[$from] = $to; -- To view, visit https://gerrit.wikimedia.org/r/63288 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b59f592c1293dbb96f4c4279201bf04fcfea29d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
