$wgDBpassword = $this->getVar( '_InstallPassword' );
}
- public function createTables() {
+ public function createTables() {
$this->db = null;
$this->useAdmin = false;
- $status = $this->getConnection();
- if ( !$status->isOK() ) {
- return $status;
- }
- $this->db->selectDB( $this->getVar( 'wgDBname' ) );
-
- if( $this->db->tableExists( 'user' ) ) {
- $status->warning( 'config-install-tables-exist' );
- return $status;
- }
-
- $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files
- $this->db->begin( __METHOD__ );
-
- $error = $this->db->sourceFile( $this->db->getSchema() );
- if( $error !== true ) {
- $this->db->reportQueryError( $error, 0, '', __METHOD__ );
- $this->db->rollback( __METHOD__ );
- $status->fatal( 'config-install-tables-failed', $error );
- } else {
- $this->db->commit( __METHOD__ );
- }
- // Resume normal operations
- if( $status->isOk() ) {
- $this->enableLB();
- }
- return $status;
- }
+ $status = $this->getConnection();
+ if ( !$status->isOK() ) {
+ return $status;
+ }
+ $this->db->selectDB( $this->getVar( 'wgDBname' ) );
+
+ if( $this->db->tableExists( 'user' ) ) {
+ $status->warning( 'config-install-tables-exist' );
+ return $status;
+ }
+
+ $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files
+ $this->db->begin( __METHOD__ );
+
+ $error = $this->db->sourceFile( $this->db->getSchema() );
+ if( $error !== true ) {
+ $this->db->reportQueryError( $error, 0, '', __METHOD__ );
+ $this->db->rollback( __METHOD__ );
+ $status->fatal( 'config-install-tables-failed', $error );
+ } else {
+ $this->db->commit( __METHOD__ );
+ }
+ // Resume normal operations
+ if( $status->isOk() ) {
+ $this->enableLB();
+ }
+ return $status;
+ }
public function setupPLpgSQL() {
$this->useAdmin = TRUE;