BUG New capture method wouldnt carry test db name through to clone in tests
This commit is contained in:
parent
b2152b4c5e
commit
f4fd71665a
|
@ -46,8 +46,8 @@ class SearchUpdater extends Object {
|
||||||
static function bind_manipulation_capture() {
|
static function bind_manipulation_capture() {
|
||||||
global $databaseConfig;
|
global $databaseConfig;
|
||||||
|
|
||||||
$connector = DB::getConn();
|
$current = DB::getConn();
|
||||||
if (!$connector || @$connector->isManipulationCapture) return; // If not yet set, or its already captured, just return
|
if (!$current || @$current->isManipulationCapture) return; // If not yet set, or its already captured, just return
|
||||||
|
|
||||||
$type = $databaseConfig['type'];
|
$type = $databaseConfig['type'];
|
||||||
$file = TEMP_FOLDER."/.cache.SMC.$type";
|
$file = TEMP_FOLDER."/.cache.SMC.$type";
|
||||||
|
@ -69,8 +69,10 @@ class SearchUpdater extends Object {
|
||||||
require_once($file);
|
require_once($file);
|
||||||
$dbClass = 'SearchManipulateCapture_'.$type;
|
$dbClass = 'SearchManipulateCapture_'.$type;
|
||||||
|
|
||||||
$conn = new $dbClass($databaseConfig);
|
$captured = new $dbClass($databaseConfig);
|
||||||
DB::setConn($conn);
|
// The connection might have had it's name changed (like if we're currently in a test)
|
||||||
|
$captured->selectDatabase($current->currentDatabase());
|
||||||
|
DB::setConn($captured);
|
||||||
}
|
}
|
||||||
|
|
||||||
static $dirty = array(); static $dirtycount = 0;
|
static $dirty = array(); static $dirtycount = 0;
|
||||||
|
|
Loading…
Reference in New Issue