}
/**
- * 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
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] );
+ }
+
}