Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/utility/temp_handler.php
Show First 20 Lines • Show All 770 Lines • ▼ Show 20 Line(s) | |||||
function &_getSeparateConnection() | function &_getSeparateConnection() | ||||
{ | { | ||||
static $connection = null; | static $connection = null; | ||||
if (!isset($connection)) { | if (!isset($connection)) { | ||||
/** @var kDBConnection $connection */ | /** @var kDBConnection $connection */ | ||||
$connection = $this->Application->makeClass( 'kDBConnection', Array (SQL_TYPE, Array ($this->Application, 'handleSQLError')) ); | $connection = $this->Application->makeClass( 'kDBConnection', Array (SQL_TYPE, Array ($this->Application, 'handleSQLError')) ); | ||||
$connection->debugMode = $this->Application->isDebugMode(); | $vars = kUtil::getSystemConfig()->getData(); | ||||
$connection->Connect(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB); | $config = array( | ||||
'Database' => array( | |||||
'DBErrorBackoffMaxRetryAttempts' => $vars['DBErrorBackoffMaxRetryAttempts'], | |||||
'DBErrorBackoffLogicBaseTime' => $vars['DBErrorBackoffLogicBaseTime'], | |||||
'DBEnableLockRetryDebugging' => $vars['DBEnableLockRetryDebugging'], | |||||
'DBHost' => SQL_SERVER, | |||||
'DBUser' => SQL_USER, | |||||
'DBUserPassword' => SQL_PASS, | |||||
'DBName' => SQL_DB, | |||||
), | |||||
); | |||||
$connection->setup($config); | |||||
} | } | ||||
return $connection; | return $connection; | ||||
} | } | ||||
function UpdateChangeLogForeignKeys($master, $live_id, $temp_id) | function UpdateChangeLogForeignKeys($master, $live_id, $temp_id) | ||||
{ | { | ||||
if ($live_id == $temp_id) { | if ($live_id == $temp_id) { | ||||
▲ Show 20 Lines • Show All 324 Lines • Show Last 20 Lines |