protected $oldTablePrefix;
protected $useTemporaryTables = true;
private static $dbSetup = false;
- private static $dbTables = null;
/**
* Table name prefixes. Oracle likes it shorter.
protected function listTables() {
global $wgDBprefix;
- if( is_null( self::$dbTables ) ) {
- $tables = $this->db->listTables( $wgDBprefix, __METHOD__ );
- $tables = array_map( array( __CLASS__, 'unprefixTable' ), $tables );
-
- if ( $this->db->getType() == 'sqlite' ) {
- $tables = array_flip( $tables );
- // these are subtables of searchindex and don't need to be duped/dropped separately
- unset( $tables['searchindex_content'] );
- unset( $tables['searchindex_segdir'] );
- unset( $tables['searchindex_segments'] );
- $tables = array_flip( $tables );
- }
- self::$dbTables = $tables;
+ $tables = $this->db->listTables( $wgDBprefix, __METHOD__ );
+ $tables = array_map( array( __CLASS__, 'unprefixTable' ), $tables );
+
+ if ( $this->db->getType() == 'sqlite' ) {
+ $tables = array_flip( $tables );
+ // these are subtables of searchindex and don't need to be duped/dropped separately
+ unset( $tables['searchindex_content'] );
+ unset( $tables['searchindex_segdir'] );
+ unset( $tables['searchindex_segments'] );
+ $tables = array_flip( $tables );
}
- return self::$dbTables;
-
+ return $tables;
}
protected function checkDbIsSupported() {