Index: trunk/phase3/includes/installer/PostgresInstaller.php |
— | — | @@ -325,37 +325,37 @@ |
326 | 326 | $wgDBpassword = $this->getVar( '_InstallPassword' ); |
327 | 327 | } |
328 | 328 | |
329 | | - public function createTables() { |
| 329 | + public function createTables() { |
330 | 330 | $this->db = null; |
331 | 331 | $this->useAdmin = false; |
332 | | - $status = $this->getConnection(); |
333 | | - if ( !$status->isOK() ) { |
334 | | - return $status; |
335 | | - } |
336 | | - $this->db->selectDB( $this->getVar( 'wgDBname' ) ); |
| 332 | + $status = $this->getConnection(); |
| 333 | + if ( !$status->isOK() ) { |
| 334 | + return $status; |
| 335 | + } |
| 336 | + $this->db->selectDB( $this->getVar( 'wgDBname' ) ); |
337 | 337 | |
338 | | - if( $this->db->tableExists( 'user' ) ) { |
339 | | - $status->warning( 'config-install-tables-exist' ); |
340 | | - return $status; |
341 | | - } |
| 338 | + if( $this->db->tableExists( 'user' ) ) { |
| 339 | + $status->warning( 'config-install-tables-exist' ); |
| 340 | + return $status; |
| 341 | + } |
342 | 342 | |
343 | | - $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files |
344 | | - $this->db->begin( __METHOD__ ); |
| 343 | + $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files |
| 344 | + $this->db->begin( __METHOD__ ); |
345 | 345 | |
346 | | - $error = $this->db->sourceFile( $this->db->getSchema() ); |
347 | | - if( $error !== true ) { |
348 | | - $this->db->reportQueryError( $error, 0, '', __METHOD__ ); |
349 | | - $this->db->rollback( __METHOD__ ); |
350 | | - $status->fatal( 'config-install-tables-failed', $error ); |
351 | | - } else { |
352 | | - $this->db->commit( __METHOD__ ); |
353 | | - } |
354 | | - // Resume normal operations |
355 | | - if( $status->isOk() ) { |
356 | | - $this->enableLB(); |
357 | | - } |
358 | | - return $status; |
359 | | - } |
| 346 | + $error = $this->db->sourceFile( $this->db->getSchema() ); |
| 347 | + if( $error !== true ) { |
| 348 | + $this->db->reportQueryError( $error, 0, '', __METHOD__ ); |
| 349 | + $this->db->rollback( __METHOD__ ); |
| 350 | + $status->fatal( 'config-install-tables-failed', $error ); |
| 351 | + } else { |
| 352 | + $this->db->commit( __METHOD__ ); |
| 353 | + } |
| 354 | + // Resume normal operations |
| 355 | + if( $status->isOk() ) { |
| 356 | + $this->enableLB(); |
| 357 | + } |
| 358 | + return $status; |
| 359 | + } |
360 | 360 | |
361 | 361 | public function setupPLpgSQL() { |
362 | 362 | $this->useAdmin = TRUE; |