* (bug 674) Allow users to be blocked from editing a specific article
[lhc/web/wiklou.git] / languages / Language.php
index fa485d1..29e8a88 100644 (file)
@@ -264,6 +264,20 @@ class Language {
                return strtr($ns, '_', ' ');
        }
 
+       /**
+        * A convenience function that returns the same thing as
+        * getFormattedNsText() except with '(Main)' for zero namespace.
+        *
+        * @return array
+        */
+       function getDisplayNsText( $index ) {
+               if( $index == 0 ) {
+                       return wfMsg( 'blanknamespace' );
+               } else {
+                       return $this->getFormattedNsText( $index );
+               }
+       }
+
        /**
         * Get a namespace key by value, case insensitive.
         * Only matches namespace names for the current language, not the