Tweak for r39314: don't add a line break before the "Go" button on the watchlist...
[lhc/web/wiklou.git] / includes / Namespace.php
index 6b468c8..7c7b7de 100644 (file)
@@ -146,8 +146,8 @@ class MWNamespace {
         }
 
        /**
-        * Does this namespace contain content, for the purposes
-        * of calculating statistics, etc?
+        * Does this namespace contain content, for the purposes of calculating
+        * statistics, etc?
         *
         * @param $index Int: index to check
         * @return bool
@@ -167,4 +167,15 @@ class MWNamespace {
                return $index >= NS_MAIN;
        }
 
+       /**
+        * Does the namespace allow subpages?
+        *
+        * @param $index int Index to check
+        * @return bool
+        */
+       public static function hasSubpages( $index ) {
+               global $wgNamespacesWithSubpages;
+               return !empty( $wgNamespacesWithSubpages[$index] );
+       }
+
 }