From: Tim Starling Date: Sat, 27 Aug 2005 03:56:58 +0000 (+0000) Subject: tab name for discussion page of extra namespace X-Git-Tag: 1.6.0~1782 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=7d8daf05ac6085ab3489c249fda4d506ec4f99b0;p=lhc%2Fweb%2Fwiklou.git tab name for discussion page of extra namespace --- diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 10e25e1f4a..95c14bbe81 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -864,7 +864,7 @@ class SkinTemplate extends Skin { case NS_CATEGORY_TALK: return 'nstab-category'; default: - return 'nstab-' . strtolower( $this->mTitle->getNsText() ); + return 'nstab-' . strtolower( $this->mTitle->getSubjectNsText() ); } } diff --git a/includes/Title.php b/includes/Title.php index 0b58b60476..9616051948 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -560,9 +560,19 @@ class Title { * @access public */ function getNsText() { - global $wgLang; - return $wgLang->getNsText( $this->mNamespace ); + global $wgContLang; + return $wgContLang->getNsText( $this->mNamespace ); + } + /** + * Get the namespace text of the subject (rather than talk) page + * @return string + * @access public + */ + function getSubjectNsText() { + global $wgContLang; + return $wgContLang->getNsText( Namespace::getSubject( $this->mNamespace ) ); } + /** * Get the interwiki prefix (or null string) * @return string