r64448 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64447‎ | r64448 | r64449 >
Date:18:43, 31 March 2010
Author:demon
Status:ok
Tags:
Comment:
Change $wgMetaNamespace to "MyWiki" right before showing the form. It defaults to $wgSiteName which defaults to "MediaWiki". This is not a valid namespace.
Modified paths:
  • /branches/new-installer/phase3/includes/installer/WebInstaller.php (modified) (history)
  • /branches/new-installer/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /branches/new-installer/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: branches/new-installer/phase3/maintenance/language/messages.inc
@@ -3285,6 +3285,7 @@
32863286 'config-ns-generic',
32873287 'config-ns-site-name',
32883288 'config-ns-other',
 3289+ 'config-ns-other-default',
32893290 'config-project-namespace-help',
32903291 'config-ns-invalid',
32913292 'config-admin-default-username',
Index: branches/new-installer/phase3/includes/installer/WebInstaller.php
@@ -1087,6 +1087,11 @@
10881088 $js = 'enableControlArray("config__NamespaceType_other", ["config_wgMetaNamespace"])';
10891089 $attribs = array( 'onclick' => $js );
10901090
 1091+ // Set wgMetaNamespace to something valid before we show the form.
 1092+ // $wgMetaNamespace defaults to $wgSiteName which is 'MediaWiki'
 1093+ $metaNS = $this->getVar( 'wgMetaNamespace' );
 1094+ $this->setVar( 'wgMetaNamespace', wfMsgNoTrans( 'config-ns-other-default' ) );
 1095+
10911096 $this->addHTML(
10921097 $this->parent->getTextBox( array(
10931098 'var' => 'wgSitename',
@@ -1143,6 +1148,9 @@
11441149 ) )
11451150 );
11461151
 1152+ // Restore the default value
 1153+ $this->setVar( 'wgMetaNamespace', $metaNS );
 1154+
11471155 $this->endForm();
11481156 return 'output';
11491157 }
Index: branches/new-installer/phase3/languages/messages/MessagesEn.php
@@ -4472,6 +4472,7 @@
44734473 'config-ns-generic' => 'Project',
44744474 'config-ns-site-name' => 'Same as the wiki name: $1',
44754475 'config-ns-other' => 'Other (please specify)',
 4476+'config-ns-other-default' => 'MyWiki',
44764477 'config-project-namespace-help' => 'Following Wikipedia\'s example, many wikis keep their policy and help pages separate from their content pages, in a "<strong>project namespace</strong>".
44774478 All page titles in this namespace start with a certain prefix, which you can specify here.
44784479 Traditionally, this prefix is derived from the name of the wiki, but it cannot contain punctuation characters such as # or :',

Status & tagging log