Index: trunk/phase3/includes/installer/Installer.i18n.php |
— | — | @@ -444,31 +444,14 @@ |
445 | 445 | 'config-insecure-secretkey' => "'''Warning:''' Unable to create secure <code>\$wgSecretKey</code>. |
446 | 446 | Consider changing it manually.", |
447 | 447 | 'config-install-sysop' => 'Creating administrator user account', |
448 | | - 'config-install-localsettings' => 'Creating LocalSettings.php', |
449 | | - 'config-install-localsettings-unwritable' => 'Warning: Could not write <code>LocalSettings.php</code>. |
450 | | -Create it yourself, using the following text: |
451 | | -<textarea name="LocalSettings" id="LocalSettings" cols="80" rows="25" readonly="readonly"> |
452 | | -$1 |
453 | | -</textarea> |
454 | | -', |
455 | 448 | 'config-install-done' => "'''Congratulations!''' |
456 | 449 | You have successfully installed MediaWiki. |
457 | 450 | |
458 | 451 | We have generated a <code>LocalSettings.php</code> file for you. It contains all your configuration. |
459 | 452 | |
460 | | -You will need to move it from <code>./config/LocalSettings.php</code> to <code>./LocalSettings.php</code> in order for MediaWiki to work: |
| 453 | +You will need to [$1 download] it and put it in the base of your wiki installation (the same directory as index.php) |
461 | 454 | |
462 | | -On a Unix/Linux system: |
463 | | - |
464 | | -<pre> |
465 | | -mv ./config/LocalSettings.php ./LocalSettings.php |
466 | | -</pre> |
467 | | - |
468 | | -When that's done, you can [$1 '''enter your wiki''']", |
469 | | - 'config-install-done-moved' => "'''Congratulations!''' |
470 | | -You have successfully installed MediaWiki. |
471 | | - |
472 | | -[$1 Enter your wiki]", |
| 455 | +When that's done, you can [$2 '''enter your wiki''']", // $1 is the URL to LocalSettings download, $2 is link to wiki |
473 | 456 | ); |
474 | 457 | |
475 | 458 | /** Dutch (Nederlands) |
Index: trunk/phase3/includes/installer/WebInstaller.php |
— | — | @@ -84,6 +84,17 @@ |
85 | 85 | $this->exportVars(); |
86 | 86 | $this->setupLanguage(); |
87 | 87 | |
| 88 | + if( $this->getVar( '_InstallDone' ) && $this->request->getVal( 'localsettings' ) ) |
| 89 | + { |
| 90 | + $ls = new LocalSettingsGenerator( $this ); |
| 91 | + $this->request->response()->header('Content-type: text/plain'); |
| 92 | + $this->request->response()->header( |
| 93 | + 'Content-Disposition: attachment; filename="LocalSettings.php"' |
| 94 | + ); |
| 95 | + echo $ls->getText(); |
| 96 | + return $this->session; |
| 97 | + } |
| 98 | + |
88 | 99 | if ( isset( $session['happyPages'] ) ) { |
89 | 100 | $this->happyPages = $session['happyPages']; |
90 | 101 | } else { |
— | — | @@ -1629,10 +1640,10 @@ |
1630 | 1641 | public function execute() { |
1631 | 1642 | global $IP; |
1632 | 1643 | $this->startForm(); |
1633 | | - $msg = file_exists( "$IP/LocalSettings.php" ) ? 'config-install-done-moved' : 'config-install-done'; |
1634 | 1644 | $this->addHTML( |
1635 | 1645 | $this->parent->getInfoBox( |
1636 | | - wfMsgNoTrans( $msg, |
| 1646 | + wfMsgNoTrans( 'config-install-done', |
| 1647 | + $GLOBALS['wgServer'] . $this->parent->getURL( array( 'localsettings' => 1 ) ), |
1637 | 1648 | $GLOBALS['wgServer'] . |
1638 | 1649 | $this->getVar( 'wgScriptPath' ) . '/index' . |
1639 | 1650 | $this->getVar( 'wgScriptExtension' ) |
Index: trunk/phase3/includes/installer/Installer.php |
— | — | @@ -133,7 +133,6 @@ |
134 | 134 | 'interwiki', |
135 | 135 | 'secretkey', |
136 | 136 | 'sysop', |
137 | | - 'localsettings', |
138 | 137 | ); |
139 | 138 | |
140 | 139 | /** |
— | — | @@ -890,7 +889,9 @@ |
891 | 890 | if( !$status->isOk() ) |
892 | 891 | break; |
893 | 892 | } |
894 | | - $this->setVar( '_InstallDone', true ); |
| 893 | + if( $status->isOk() ) { |
| 894 | + $this->setVar( '_InstallDone', true ); |
| 895 | + } |
895 | 896 | return $installResults; |
896 | 897 | } |
897 | 898 | |
— | — | @@ -973,11 +974,6 @@ |
974 | 975 | return Status::newGood(); |
975 | 976 | } |
976 | 977 | |
977 | | - public function installLocalsettings() { |
978 | | - $localSettings = new LocalSettingsGenerator( $this ); |
979 | | - return $localSettings->writeLocalSettings(); |
980 | | - } |
981 | | - |
982 | 978 | /** |
983 | 979 | * Determine if LocalSettings exists. If it does, return an appropriate |
984 | 980 | * status for whether we should can upgrade or not |
Index: trunk/phase3/includes/installer/LocalSettingsGenerator.php |
— | — | @@ -74,26 +74,6 @@ |
75 | 75 | return $localSettings; |
76 | 76 | } |
77 | 77 | |
78 | | - /** |
79 | | - * Write the file |
80 | | - * @param $secretKey String A random string to |
81 | | - * @return boolean On successful file write |
82 | | - */ |
83 | | - public function writeLocalSettings() { |
84 | | - $localSettings = $this->getText(); |
85 | | - wfSuppressWarnings(); |
86 | | - $ret = file_put_contents( $this->configPath . '/LocalSettings.php', $localSettings ); |
87 | | - wfRestoreWarnings(); |
88 | | - |
89 | | - $status = Status::newGood(); |
90 | | - |
91 | | - if ( !$ret ) { |
92 | | - $status->fatal( 'config-install-localsettings-unwritable', $localSettings ); |
93 | | - } |
94 | | - |
95 | | - return $status; |
96 | | - } |
97 | | - |
98 | 78 | private function buildMemcachedServerList() { |
99 | 79 | $servers = $this->values['_MemCachedServers']; |
100 | 80 | if( !$servers ) { |