http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69104
Revision: 69104 Author: demon Date: 2010-07-06 18:57:06 +0000 (Tue, 06 Jul 2010) Log Message: ----------- Disable installer when LocalSettings.php is detected Modified Paths: -------------- trunk/phase3/includes/installer/Installer.i18n.php trunk/phase3/includes/installer/WebInstaller.php Modified: trunk/phase3/includes/installer/Installer.i18n.php =================================================================== --- trunk/phase3/includes/installer/Installer.i18n.php 2010-07-06 18:31:55 UTC (rev 69103) +++ trunk/phase3/includes/installer/Installer.i18n.php 2010-07-06 18:57:06 UTC (rev 69104) @@ -13,6 +13,10 @@ $messages['en'] = array( 'config-title' => 'MediaWiki $1 installation', 'config-information' => 'Information', + 'config-localsettings-upgrade' => "'''Warning''': Your <code>LocalSettings.php</code> file has been detected. +Your software is able to upgrade. Please move LocalSettings.php to somewhere safe in then run the installer again.", + 'config-localsettings-noupgrade' => "'''Error''': Your <code>LocalSettings.php</code> file has been detected. +Your software is not able to upgrade at this time. The installer has been disabled for security reasons.", 'config-session-error' => 'Error starting session: $1', 'config-session-expired' => 'Your session data seems to have expired. Sessions are configured for a lifetime of $1. Modified: trunk/phase3/includes/installer/WebInstaller.php =================================================================== --- trunk/phase3/includes/installer/WebInstaller.php 2010-07-06 18:31:55 UTC (rev 69103) +++ trunk/phase3/includes/installer/WebInstaller.php 2010-07-06 18:57:06 UTC (rev 69104) @@ -159,7 +159,13 @@ # Execute the page $this->currentPageName = $page->getName(); $this->startPageWrapper( $pageName ); - $result = $page->execute(); + $localSettings = $this->getLocalSettingsStatus(); + if( !$localSettings->isGood() ) { + $this->showStatusBox( $localSettings ); + $result = 'output'; + } else { + $result = $page->execute(); + } $this->endPageWrapper(); if ( $result == 'skip' ) { _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs