Nikerabbit has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328481 )

Change subject: CoreParserFunctions: Use Title::inNamespace instead of manual 
comparison
......................................................................

CoreParserFunctions: Use Title::inNamespace instead of manual comparison

Change-Id: I60c02bc68ef0d48b1dc66ba0961275feec5789fb
---
M includes/parser/CoreParserFunctions.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/81/328481/1

diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index 51cb410..6aa3acc 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -276,7 +276,7 @@
                }
                if ( !is_null( $title ) ) {
                        # Convert NS_MEDIA -> NS_FILE
-                       if ( $title->getNamespace() == NS_MEDIA ) {
+                       if ( $title->inNamespace( NS_MEDIA ) ) {
                                $title = Title::makeTitle( NS_FILE, 
$title->getDBkey() );
                        }
                        if ( !is_null( $arg ) ) {
@@ -341,7 +341,7 @@
                // allow prefix.
                $title = Title::newFromText( $username );
 
-               if ( $title && $title->getNamespace() == NS_USER ) {
+               if ( $title && $title->inNamespace( NS_USER ) ) {
                        $username = $title->getText();
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/328481
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60c02bc68ef0d48b1dc66ba0961275feec5789fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to