Allow user to always preview text on editing ( implement http://bugzilla.wikipedia...
[lhc/web/wiklou.git] / includes / Namespace.php
index 81c4a49..a52e06d 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 /**
  * Provide things related to namespaces
+ * @package MediaWiki
  */
  
 /**
@@ -33,8 +34,8 @@ $wgCanonicalNamespaceNames = array(
        NS_CATEGORY_TALK    => 'Category_talk'
 );
 
-if(isset($wgExtraNamespaces)) {
-       $wgCanonicalNamespaceNames=$wgCanonicalNamespaceNames+$wgExtraNamespaces;
+if( defined( 'MEDIAWIKI' ) && is_array( $wgExtraNamespaces ) ) {
+       $wgCanonicalNamespaceNames = $wgCanonicalNamespaceNames + $wgExtraNamespaces;
 }
 
 /**
@@ -45,7 +46,9 @@ if(isset($wgExtraNamespaces)) {
  *
  * These are synonyms for the names given in the language file
  * Users and translators should not change them
-*/
+ *
+ * @package MediaWiki
+ */
 class Namespace {
 
        /**#@+