Index: trunk/phase3/includes/installer/Installer.php |
— | — | @@ -373,17 +373,6 @@ |
374 | 374 | } |
375 | 375 | |
376 | 376 | /** |
377 | | - * TODO: document |
378 | | - * |
379 | | - * @param $installer DatabaseInstaller |
380 | | - * |
381 | | - * @return Status |
382 | | - */ |
383 | | - public function installMainpage( DatabaseInstaller &$installer ) { |
384 | | - return $installer->createMainpage(); |
385 | | - } |
386 | | - |
387 | | - /** |
388 | 377 | * Exports all wg* variables stored by the installer into global scope. |
389 | 378 | */ |
390 | 379 | public function exportVars() { |
Index: trunk/phase3/includes/installer/CoreInstaller.php |
— | — | @@ -433,6 +433,27 @@ |
434 | 434 | } |
435 | 435 | |
436 | 436 | /** |
| 437 | + * Insert Main Page with default content. |
| 438 | + * |
| 439 | + * @return Status |
| 440 | + */ |
| 441 | + public function installMainpage( DatabaseInstaller &$installer ) { |
| 442 | + $status = Status::newGood(); |
| 443 | + try { |
| 444 | + $titleobj = Title::newFromText( wfMsgNoDB( "mainpage" ) ); |
| 445 | + $article = new Article( $titleobj ); |
| 446 | + $article->doEdit( wfMsg( 'mainpagetext' ) . "\n\n" . wfMsgNoTrans( 'mainpagedocfooter' ), |
| 447 | + '', |
| 448 | + EDIT_NEW ); |
| 449 | + } catch (MWException $e) { |
| 450 | + //using raw, because $wgShowExceptionDetails can not be set yet |
| 451 | + $status->fatal( 'config-install-mainpage-failed', $e->getMessage() ); |
| 452 | + } |
| 453 | + |
| 454 | + return $status; |
| 455 | + } |
| 456 | + |
| 457 | + /** |
437 | 458 | * Override the necessary bits of the config to run an installation. |
438 | 459 | */ |
439 | 460 | public static function overrideConfig() { |
Index: trunk/phase3/includes/installer/DatabaseInstaller.php |
— | — | @@ -137,27 +137,6 @@ |
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
141 | | - * Insert Main Page with default content. |
142 | | - * |
143 | | - * @return Status |
144 | | - */ |
145 | | - public function createMainpage() { |
146 | | - $status = Status::newGood(); |
147 | | - try { |
148 | | - $titleobj = Title::newFromText( wfMsgNoDB( "mainpage" ) ); |
149 | | - $article = new Article( $titleobj ); |
150 | | - $article->doEdit( wfMsg( 'mainpagetext' ) . "\n\n" . wfMsgNoTrans( 'mainpagedocfooter' ), |
151 | | - '', |
152 | | - EDIT_NEW ); |
153 | | - } catch (MWException $e) { |
154 | | - //using raw, because $wgShowExceptionDetails can not be set yet |
155 | | - $status->fatal( 'config-install-mainpage-failed', $e->getMessage() ); |
156 | | - } |
157 | | - |
158 | | - return $status; |
159 | | - } |
160 | | - |
161 | | - /** |
162 | 141 | * Get the DBMS-specific options for LocalSettings.php generation. |
163 | 142 | * |
164 | 143 | * @return String |