if ( !$status->isOK() ) {
return $status;
}
- $this->db;
- $updater = DatabaseUpdater::newForDB( $this->db );
- $extensionUpdates = $updater->getNewExtensions();
-
- // No extensions need tables (or haven't updated to new installer support)
- if( !count( $extensionUpdates ) ) {
- return $status;
- }
-
- $ourExtensions = array_map( 'strtolower', $this->getVar( '_Extensions' ) );
-
- foreach( $ourExtensions as $ext ) {
- if( isset( $extensionUpdates[$ext] ) ) {
- $this->db->begin( __METHOD__ );
- $error = $this->db->sourceFile( $extensionUpdates[$ext] );
- if( $error !== true ) {
- $this->db->rollback( __METHOD__ );
- $status->warning( 'config-install-tables-failed', $error );
- } else {
- $this->db->commit( __METHOD__ );
- }
- }
- }
- return $status;
- }
-
- /**
- * Create the tables for each extension the user enabled
- * @return Status
- */
- public function createExtensionTables() {
- $status = $this->getConnection();
- if ( !$status->isOK() ) {
- return $status;
- }
- $this->db;
- $updater = DatabaseUpdater::newForDB( $this->db );
- $extensionUpdates = $updater->getNewExtensions();
-
- // No extensions need tables (or haven't updated to new installer support)
- if( !count( $extensionUpdates ) ) {
- return $status;
- }
-
- $ourExtensions = array_map( 'strtolower', $this->getVar( '_Extensions' ) );
-
- foreach( $ourExtensions as $ext ) {
- if( isset( $extensionUpdates[$ext] ) ) {
- $this->db->begin( __METHOD__ );
- $error = $this->db->sourceFile( $extensionUpdates[$ext] );
- if( $error !== true ) {
- $this->db->rollback( __METHOD__ );
- $status->warning( 'config-install-tables-failed', $error );
- } else {
- $this->db->commit( __METHOD__ );
- }
- }
- }
- return $status;
- }
-
- /**
- * Create the tables for each extension the user enabled
- * @return Status
- */
- public function createExtensionTables() {
- $status = $this->getConnection();
- if ( !$status->isOK() ) {
- return $status;
- }
- $this->db;
$updater = DatabaseUpdater::newForDB( $this->db );
$extensionUpdates = $updater->getNewExtensions();