Use hasSubjectNamespace in Skin.php instead of namespace tests.
authorDaniel Friesen <pub-github@nadir-seen-fire.com>
Thu, 30 Aug 2012 20:05:58 +0000 (13:05 -0700)
committerAntoine Musso <hashar@free.fr>
Mon, 1 Oct 2012 18:53:40 +0000 (20:53 +0200)
Change-Id: I11c5657de868a99429d400e0edb05707ec6069fb

includes/Skin.php

index 968f215..9bee8a2 100644 (file)
@@ -290,8 +290,8 @@ abstract class Skin extends ContextSource {
                        return $this->mRelevantUser;
                }
                $title = $this->getRelevantTitle();
-               if( $title->getNamespace() == NS_USER || $title->getNamespace() == NS_USER_TALK ) {
-                       $rootUser = strtok( $title->getText(), '/' );
+               if( $title->hasSubjectNamespace( NS_USER ) ) {
+                       $rootUser = $title->getRootText();
                        if ( User::isIP( $rootUser ) ) {
                                $this->mRelevantUser = User::newFromName( $rootUser, false );
                        } else {