mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
3.2 compat
This commit is contained in:
parent
10787bc310
commit
3ad9369b0a
@ -43,7 +43,16 @@ class SearchUpdater extends Object {
|
|||||||
require_once($file);
|
require_once($file);
|
||||||
$dbClass = 'SearchManipulateCapture_'.$type;
|
$dbClass = 'SearchManipulateCapture_'.$type;
|
||||||
|
|
||||||
|
/** @var SS_Database $captured */
|
||||||
$captured = new $dbClass($databaseConfig);
|
$captured = new $dbClass($databaseConfig);
|
||||||
|
|
||||||
|
// Framework 3.2+ ORM needs some dependencies set
|
||||||
|
if (method_exists($captured, "setConnector")) {
|
||||||
|
$captured->setConnector($current->getConnector());
|
||||||
|
$captured->setQueryBuilder($current->getQueryBuilder());
|
||||||
|
$captured->setSchemaManager($current->getSchemaManager());
|
||||||
|
}
|
||||||
|
|
||||||
// The connection might have had it's name changed (like if we're currently in a test)
|
// The connection might have had it's name changed (like if we're currently in a test)
|
||||||
$captured->selectDatabase($current->currentDatabase());
|
$captured->selectDatabase($current->currentDatabase());
|
||||||
DB::setConn($captured);
|
DB::setConn($captured);
|
||||||
|
Loading…
Reference in New Issue
Block a user