tab name for discussion page of extra namespace
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 27 Aug 2005 03:56:58 +0000 (03:56 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 27 Aug 2005 03:56:58 +0000 (03:56 +0000)
includes/SkinTemplate.php
includes/Title.php

index 10e25e1..95c14bb 100644 (file)
@@ -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() );
                }
        }
 
index 0b58b60..9616051 100644 (file)
@@ -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