(bug 26939) Installer does not set $wgMetaNamespace
authorMax Semenik <maxsem@users.mediawiki.org>
Sun, 20 Mar 2011 17:36:18 +0000 (17:36 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Sun, 20 Mar 2011 17:36:18 +0000 (17:36 +0000)
RELEASE-NOTES
includes/installer/CliInstaller.php

index df85d7a..805ef2c 100644 (file)
@@ -198,8 +198,9 @@ PHP if you have not done so prior to upgrading MediaWiki.
 * (bug 28034) uploading file to local wiki when file exists on shared repository
   (commons) gives spurious info in the warning message
 * Usernames get lost when selecting different sorts on Special:listfiles
-* (Bug 14005) editing section 0 of an existing but empty page gives no such
+* (bug 14005) editing section 0 of an existing but empty page gives no such
   section error
+* (bug 26939) Installer does not set $wgMetaNamespace
 
 === API changes in 1.18 ===
 * (bug 26339) Throw warning when truncating an overlarge API result
index 46754a7..bfa6e8a 100644 (file)
@@ -44,6 +44,8 @@ class CliInstaller extends Installer {
         * @param $option Array
         */
        function __construct( $siteName, $admin = null, array $option = array() ) {
+               global $wgContLang;
+
                parent::__construct();
 
                foreach ( $this->optionMap as $opt => $global ) {
@@ -54,7 +56,7 @@ class CliInstaller extends Installer {
                }
 
                if ( isset( $option['lang'] ) ) {
-                       global $wgLang, $wgContLang, $wgLanguageCode;
+                       global $wgLang, $wgLanguageCode;
                        $this->setVar( '_UserLang', $option['lang'] );
                        $wgContLang = Language::factory( $option['lang'] );
                        $wgLang = Language::factory( $option['lang'] );
@@ -63,6 +65,12 @@ class CliInstaller extends Installer {
 
                $this->setVar( 'wgSitename', $siteName );
 
+               $metaNS = $wgContLang->ucfirst( str_replace( ' ', '_', $siteName ) );
+               if ( $metaNS == 'MediaWiki' ) {
+                       $metaNS = 'Project';
+               }
+               $this->setVar( 'wgMetaNamespace', $metaNS );
+
                if ( $admin ) {
                        $this->setVar( '_AdminName', $admin );
                }