From b9b85843572bf283f48285001e276ba7e61b63f6 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 22 Feb 2009 13:37:51 +0100 Subject: updated to MediaWiki 1.14.0 --- includes/Namespace.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'includes/Namespace.php') diff --git a/includes/Namespace.php b/includes/Namespace.php index 7c7b7ded..3d618e64 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -16,8 +16,8 @@ $wgCanonicalNamespaceNames = array( NS_USER_TALK => 'User_talk', NS_PROJECT => 'Project', NS_PROJECT_TALK => 'Project_talk', - NS_IMAGE => 'Image', - NS_IMAGE_TALK => 'Image_talk', + NS_FILE => 'File', + NS_FILE_TALK => 'File_talk', NS_MEDIAWIKI => 'MediaWiki', NS_MEDIAWIKI_TALK => 'MediaWiki_talk', NS_TEMPLATE => 'Template', @@ -53,7 +53,7 @@ class MWNamespace { */ public static function isMovable( $index ) { global $wgAllowImageMoving; - return !( $index < NS_MAIN || ($index == NS_IMAGE && !$wgAllowImageMoving) || $index == NS_CATEGORY ); + return !( $index < NS_MAIN || ($index == NS_FILE && !$wgAllowImageMoving) || $index == NS_CATEGORY ); } /** @@ -105,11 +105,15 @@ class MWNamespace { * Returns the canonical (English Wikipedia) name for a given index * * @param $index Int: namespace index - * @return string + * @return string or false if no canonical definition. */ public static function getCanonicalName( $index ) { global $wgCanonicalNamespaceNames; - return $wgCanonicalNamespaceNames[$index]; + if( isset( $wgCanonicalNamespaceNames[$index] ) ) { + return $wgCanonicalNamespaceNames[$index]; + } else { + return false; + } } /** -- cgit v1.2.3-54-g00ecf