From: Daniel Friesen Date: Thu, 30 Aug 2012 20:05:58 +0000 (-0700) Subject: Use hasSubjectNamespace in Skin.php instead of namespace tests. X-Git-Tag: 1.31.0-rc.0~22212^2 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=09ada02d6e4bd42b37f3b017d1586625fb98c429;p=lhc%2Fweb%2Fwiklou.git Use hasSubjectNamespace in Skin.php instead of namespace tests. Change-Id: I11c5657de868a99429d400e0edb05707ec6069fb --- diff --git a/includes/Skin.php b/includes/Skin.php index 968f215e11..9bee8a2735 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -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 {