Index: trunk/phase3/includes/db/DatabaseOracle.php |
— | — | @@ -268,10 +268,7 @@ |
269 | 269 | } |
270 | 270 | |
271 | 271 | if ( !$this->mConn ) { |
272 | | - wfDebug( "DB connection error\n" ); |
273 | | - wfDebug( "Server: $server, Database: $dbName, User: $user, Password: " . substr( $password, 0, 3 ) . "...\n" ); |
274 | | - wfDebug( $this->lastError() . "\n" ); |
275 | | - return false; |
| 272 | + throw new DBConnectionError( $this, $this->lastError() ); |
276 | 273 | } |
277 | 274 | |
278 | 275 | $this->mOpened = true; |
— | — | @@ -1198,6 +1195,8 @@ |
1199 | 1196 | } |
1200 | 1197 | |
1201 | 1198 | function update( $table, $values, $conds, $fname = 'DatabaseOracle::update', $options = array() ) { |
| 1199 | + global $wgContLang; |
| 1200 | + |
1202 | 1201 | $table = $this->tableName( $table ); |
1203 | 1202 | $opts = $this->makeUpdateOptions( $options ); |
1204 | 1203 | $sql = "UPDATE $opts $table SET "; |
Index: trunk/phase3/includes/installer/Installer.php |
— | — | @@ -357,6 +357,8 @@ |
358 | 358 | if( $status->isOK() ) { |
359 | 359 | LBFactory::enableBackend(); |
360 | 360 | } |
| 361 | + |
| 362 | + return $status; |
361 | 363 | } |
362 | 364 | |
363 | 365 | /** |
— | — | @@ -371,6 +373,17 @@ |
372 | 374 | } |
373 | 375 | |
374 | 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 | + /** |
375 | 388 | * Exports all wg* variables stored by the installer into global scope. |
376 | 389 | */ |
377 | 390 | public function exportVars() { |
Index: trunk/phase3/includes/installer/CoreInstaller.php |
— | — | @@ -96,6 +96,7 @@ |
97 | 97 | 'interwiki', |
98 | 98 | 'secretkey', |
99 | 99 | 'sysop', |
| 100 | + 'mainpage', |
100 | 101 | ); |
101 | 102 | |
102 | 103 | /** |
Index: trunk/phase3/includes/installer/Installer.i18n.php |
— | — | @@ -481,6 +481,8 @@ |
482 | 482 | 'config-insecure-secretkey' => "'''Warning:''' Unable to create secure <code>\$wgSecretKey</code>. |
483 | 483 | Consider changing it manually.", |
484 | 484 | 'config-install-sysop' => 'Creating administrator user account', |
| 485 | + 'config-install-mainpage' => 'Creating main page with default content', |
| 486 | + 'config-install-mainpage-failed' => 'Could not insert main page.', |
485 | 487 | 'config-install-done' => "'''Congratulations!''' |
486 | 488 | You have successfully installed MediaWiki. |
487 | 489 | |
Index: trunk/phase3/includes/installer/DatabaseInstaller.php |
— | — | @@ -137,6 +137,27 @@ |
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 | + /** |
141 | 162 | * Get the DBMS-specific options for LocalSettings.php generation. |
142 | 163 | * |
143 | 164 | * @return String |
Index: trunk/phase3/includes/installer/OracleInstaller.php |
— | — | @@ -120,7 +120,6 @@ |
121 | 121 | $this->getVar( '_InstallUser' ), |
122 | 122 | $this->getVar( '_InstallPassword' ), |
123 | 123 | $this->getVar( 'wgDBname' ), |
124 | | - false, |
125 | 124 | DBO_SYSDBA, |
126 | 125 | $this->getVar( 'wgDBprefix' ) |
127 | 126 | ); |
— | — | @@ -130,7 +129,6 @@ |
131 | 130 | $this->getVar( 'wgDBuser' ), |
132 | 131 | $this->getVar( 'wgDBpassword' ), |
133 | 132 | $this->getVar( 'wgDBname' ), |
134 | | - false, |
135 | 133 | 0, |
136 | 134 | $this->getVar( 'wgDBprefix' ) |
137 | 135 | ); |