From: Hypolite Petovan Date: Sun, 8 Jul 2018 05:45:22 +0000 (-0400) Subject: Revert using Config class in dba X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9396b056594c6a3233ccace070c73e0acae859e6;p=friendica.git Revert using Config class in dba --- diff --git a/include/dba.php b/include/dba.php index 3850cb097c..f6120f673f 100644 --- a/include/dba.php +++ b/include/dba.php @@ -1,6 +1,9 @@ getConfigVariable() instead. +//use Friendica\Core\Config; + use Friendica\Core\System; use Friendica\Database\DBM; use Friendica\Database\DBStructure; @@ -383,7 +386,7 @@ class dba { $orig_sql = $sql; - if (Config::get('system', 'db_callstack')) { + if ($a->getConfigValue('system', 'db_callstack')) { $sql = "/*".System::callstack()." */ ".$sql; } @@ -544,15 +547,15 @@ class dba { $a->save_timestamp($stamp1, 'database'); - if (Config::get('system', 'db_log')) { + if ($a->getConfigValue('system', 'db_log')) { $stamp2 = microtime(true); $duration = (float)($stamp2 - $stamp1); - if (($duration > Config::get('system', 'db_loglimit'))) { + if (($duration > $a->getConfigValue('system', 'db_loglimit'))) { $duration = round($duration, 3); $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); - @file_put_contents(Config::get('system', 'db_log'), DateTimeFormat::utcNow()."\t".$duration."\t". + @file_put_contents($a->getConfigValue('system', 'db_log'), DateTimeFormat::utcNow()."\t".$duration."\t". basename($backtrace[1]["file"])."\t". $backtrace[1]["line"]."\t".$backtrace[2]["function"]."\t". substr(self::replaceParameters($sql, $args), 0, 2000)."\n", FILE_APPEND);