From 370e83bb0dfd0c70de268c93bf07ad5ee0897192 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 15 Aug 2008 01:29:47 +0200 Subject: Update auf 1.13.0 --- includes/Namespace.php | 55 +++++++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 23 deletions(-) (limited to 'includes/Namespace.php') diff --git a/includes/Namespace.php b/includes/Namespace.php index 57a71282..7c7b7ded 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -1,6 +1,7 @@ = NS_MAIN; } - + /** - * 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 Index to check + * @param $index Int: index to check * @return bool */ public static function isContent( $index ) { global $wgContentNamespaces; return $index == NS_MAIN || in_array( $index, $wgContentNamespaces ); } - + /** * Can pages in a namespace be watched? * - * @param int $index + * @param $index Int * @return bool */ public static function isWatchable( $index ) { return $index >= NS_MAIN; } - -} \ No newline at end of file + + /** + * Does the namespace allow subpages? + * + * @param $index int Index to check + * @return bool + */ + public static function hasSubpages( $index ) { + global $wgNamespacesWithSubpages; + return !empty( $wgNamespacesWithSubpages[$index] ); + } + +} -- cgit v1.2.3-54-g00ecf