Merge "add Interwiki::selectFields"
[lhc/web/wiklou.git] / includes / Namespace.php
index e536d8b..9ec6948 100644 (file)
@@ -67,6 +67,7 @@ class MWNamespace {
        /**
         * @see self::isSubject
         * @deprecated Please use the more consistently named isSubject (since 1.19)
+        * @return bool
         */
        public static function isMain( $index ) {
                wfDeprecated( __METHOD__, '1.19' );
@@ -185,7 +186,7 @@ class MWNamespace {
         * Returns array of all defined namespaces with their canonical
         * (English) names.
         *
-        * @return \array
+        * @return array
         * @since 1.17
         */
        public static function getCanonicalNamespaces() {
@@ -353,4 +354,16 @@ class MWNamespace {
                return $index == NS_USER || $index == NS_USER_TALK;
        }
 
+       /**
+        * It is not possible to use pages from this namespace as template?
+        *
+        * @since 1.20
+        * @param $index int Index to check
+        * @return bool
+        */
+       public static function isNonincludable( $index ) {
+               global $wgNonincludableNamespaces;
+               return $wgNonincludableNamespaces && in_array( $index, $wgNonincludableNamespaces );
+       }
+
 }