jenkins-bot has submitted this change and it was merged. Change subject: Check for the namespace correctly in Special:Allmessages ......................................................................
Check for the namespace correctly in Special:Allmessages This is a followup to I21a6d4359faf9d86ce3b01e423e8c3ab4c02658f It fixes an error there, which causes a lot of messages not to appear. This checks for the namespace of the page correctly. Change-Id: I63a34a4d674454edf9627a5893ef9dd15643f927 (cherry picked from commit 5b67f0effadfb70a2d121c83323db134866ab6ef) --- M includes/specials/SpecialAllmessages.php 1 file changed, 10 insertions(+), 6 deletions(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialAllmessages.php b/includes/specials/SpecialAllmessages.php index 33c92b5..687cbd0 100644 --- a/includes/specials/SpecialAllmessages.php +++ b/includes/specials/SpecialAllmessages.php @@ -272,19 +272,23 @@ foreach ( $res as $s ) { $exists = false; + if ( $foreign ) { - $title = explode( '/', $s->page_title ); - if ( count( $title ) === 2 && $langcode === $title[1] - && isset( $xNames[$title[0]] ) + $titleParts = explode( '/', $s->page_title ); + if ( count( $titleParts ) === 2 && + $langcode === $titleParts[1] && + isset( $xNames[$titleParts[0]] ) ) { - $exists = $title[0]; + $exists = $titleParts[0]; } } elseif ( isset( $xNames[$s->page_title] ) ) { $exists = $s->page_title; } - if ( $exists && $s->page_namespace === NS_MEDIAWIKI ) { + + $title = Title::newFromRow( $s ); + if ( $exists && $title->inNamespace( NS_MEDIAWIKI ) ) { $pageFlags[$exists] = true; - } elseif ( $exists && $s->page_namespace === NS_MEDIAWIKI_TALK ) { + } elseif ( $exists && $title->inNamespace( NS_MEDIAWIKI_TALK ) ) { $talkFlags[$exists] = true; } } -- To view, visit https://gerrit.wikimedia.org/r/131481 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I63a34a4d674454edf9627a5893ef9dd15643f927 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.24wmf2 Gerrit-Owner: Amire80 <amir.ahar...@mail.huji.ac.il> Gerrit-Reviewer: Anomie <bjor...@wikimedia.org> Gerrit-Reviewer: Siebrand <siebr...@kitano.nl> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits