(bug 26690) Value of the 'Name of wiki' field is not retain after two subsequent...
authorChad Horohoe <demon@users.mediawiki.org>
Sun, 6 Mar 2011 19:52:23 +0000 (19:52 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Sun, 6 Mar 2011 19:52:23 +0000 (19:52 +0000)
The original intention, as I saw it, was to encourage people from choosing 'MediaWiki' as the name of their wiki. Just hardcode it, I don't think we're changing the name anytime soon.

includes/installer/WebInstallerPage.php

index 090f03c..a04b298 100644 (file)
@@ -552,7 +552,11 @@ class WebInstaller_Name extends WebInstallerPage {
 
                $this->startForm();
 
-               if ( $this->getVar( 'wgSitename' ) == $GLOBALS['wgSitename'] ) {
+               // Encourage people to not name their site 'MediaWiki' by blanking the
+               // field. I think that was the intent with the original $GLOBALS['wgSitename']
+               // but these two always were the same so had the effect of making the
+               // installer forget $wgSitename when navigating back to this page.
+               if ( $this->getVar( 'wgSitename' ) == 'MediaWiki' ) {
                        $this->setVar( 'wgSitename', '' );
                }