From: Max Semenik Date: Sun, 20 Mar 2011 17:36:18 +0000 (+0000) Subject: (bug 26939) Installer does not set $wgMetaNamespace X-Git-Tag: 1.31.0-rc.0~31290 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=f7acf5333599e1e7fd46c5c92ba0fccd2e5ce418;p=lhc%2Fweb%2Fwiklou.git (bug 26939) Installer does not set $wgMetaNamespace --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index df85d7a04e..805ef2c7ff 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 diff --git a/includes/installer/CliInstaller.php b/includes/installer/CliInstaller.php index 46754a70f0..bfa6e8aa20 100644 --- a/includes/installer/CliInstaller.php +++ b/includes/installer/CliInstaller.php @@ -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 ); }