mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 12:05:29 +00:00
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() {
|
||||
global $databaseConfig;
|
||||
|
||||
$connector = DB::getConn();
|
||||
if (!$connector || @$connector->isManipulationCapture) return; // If not yet set, or its already captured, just return
|
||||
$current = DB::getConn();
|
||||
if (!$current || @$current->isManipulationCapture) return; // If not yet set, or its already captured, just return
|
||||
|
||||
$type = $databaseConfig['type'];
|
||||
$file = TEMP_FOLDER."/.cache.SMC.$type";
|
||||
@ -69,8 +69,10 @@ class SearchUpdater extends Object {
|
||||
require_once($file);
|
||||
$dbClass = 'SearchManipulateCapture_'.$type;
|
||||
|
||||
$conn = new $dbClass($databaseConfig);
|
||||
DB::setConn($conn);
|
||||
$captured = new $dbClass($databaseConfig);
|
||||
// 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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user