http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89303
Revision: 89303
Author: demon
Date: 2011-06-01 23:17:29 +0000 (Wed, 01 Jun 2011)
Log Message:
-----------
Mostly revert r89302, was slower than the original
Modified Paths:
--------------
trunk/phase3/tests/phpunit/MediaWikiTestCase.php
Modified: trunk/phase3/tests/phpunit/MediaWikiTestCase.php
===================================================================
--- trunk/phase3/tests/phpunit/MediaWikiTestCase.php 2011-06-01 22:54:33 UTC
(rev 89302)
+++ trunk/phase3/tests/phpunit/MediaWikiTestCase.php 2011-06-01 23:17:29 UTC
(rev 89303)
@@ -12,7 +12,6 @@
protected $oldTablePrefix;
protected $useTemporaryTables = true;
private static $dbSetup = false;
- private static $dbTables = null;
/**
* Table name prefixes. Oracle likes it shorter.
@@ -192,22 +191,18 @@
protected function listTables() {
global $wgDBprefix;
- if( is_null( self::$dbTables ) ) {
- $tables = $this->db->listTables( $wgDBprefix,
__METHOD__ );
- $tables = array_map( array( __CLASS__, 'unprefixTable'
), $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 );
- }
- self::$dbTables = $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() {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs