(bug 26939) $wgMetaNamespace is not being generated
authorChad Horohoe <demon@users.mediawiki.org>
Fri, 28 Jan 2011 21:02:36 +0000 (21:02 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Fri, 28 Jan 2011 21:02:36 +0000 (21:02 +0000)
includes/installer/LocalSettingsGenerator.php
includes/installer/WebInstallerPage.php

index 6c49fbd..37ddd61 100644 (file)
@@ -46,6 +46,7 @@ class LocalSettingsGenerator {
                                'wgRightsText', 'wgRightsCode', 'wgMainCacheType', 'wgEnableUploads',
                                'wgMainCacheType', '_MemCachedServers', 'wgDBserver', 'wgDBuser',
                                'wgDBpassword', 'wgUseInstantCommons', 'wgUpgradeKey', 'wgDefaultSkin',
+                               'wgMetaNamespace'
                        ),
                        $db->getGlobalNames()
                );
@@ -171,6 +172,10 @@ class LocalSettingsGenerator {
 
                $rights = $this->values['wgRightsUrl'] ? '' : '#';
                $hashedUploads = $this->safeMode ? '' : '#';
+               $metaNamespace = '';
+               if( $this->values['wgMetaNamespace'] !== $this->values['wgSitename'] ) {
+                       $metaNamespace = "\$wgMetaNamespace = \"{$this->values['wgMetaNamespace']}\";\n";
+               }
 
                switch( $this->values['wgMainCacheType'] ) {
                        case 'anything':
@@ -205,8 +210,8 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 ## Uncomment this to disable output compression
 # \$wgDisableOutputCompression = true;
 
-\$wgSitename         = \"{$this->values['wgSitename']}\";
-
+\$wgSitename      = \"{$this->values['wgSitename']}\";
+{$metaNamespace}
 ## The URL base path to the directory containing the wiki;
 ## defaults for all runtime URL paths are based off of this.
 ## For more information on customizing the URLs please see:
index 8ed0b2d..9fa81f4 100644 (file)
@@ -624,7 +624,7 @@ class WebInstaller_Name extends WebInstallerPage {
                $retVal = true;
                $this->parent->setVarsFromRequest( array( 'wgSitename', '_NamespaceType',
                        '_AdminName', '_AdminPassword', '_AdminPassword2', '_AdminEmail',
-                       '_Subscribe', '_SkipOptional' ) );
+                       '_Subscribe', '_SkipOptional', 'wgMetaNamespace' ) );
 
                // Validate site name
                if ( strval( $this->getVar( 'wgSitename' ) ) === '' ) {