From 7d8daf05ac6085ab3489c249fda4d506ec4f99b0 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 27 Aug 2005 03:56:58 +0000 Subject: [PATCH] tab name for discussion page of extra namespace --- includes/SkinTemplate.php | 2 +- includes/Title.php | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) 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 -- 2.20.1