r81484 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81483‎ | r81484 | r81485 >
Date:20:47, 3 February 2011
Author:reedy
Status:ok
Tags:
Comment:
Fixup spaces to tabs
Modified paths:
  • /trunk/phase3/includes/installer/PostgresInstaller.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/PostgresInstaller.php
@@ -325,37 +325,37 @@
326326 $wgDBpassword = $this->getVar( '_InstallPassword' );
327327 }
328328
329 - public function createTables() {
 329+ public function createTables() {
330330 $this->db = null;
331331 $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' ) );
337337
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+ }
342342
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__ );
345345
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+ }
360360
361361 public function setupPLpgSQL() {
362362 $this->useAdmin = TRUE;

Status & tagging log