use Friendica\Core\PConfig;
use Cache;
+use dba;
use dbm;
use Detection\MobileDetect;
$this->remove_inactive_processes();
- q('START TRANSACTION');
+ dba::transaction();
$r = q('SELECT `pid` FROM `process` WHERE `pid` = %d', intval(getmypid()));
if (!dbm::is_result($r)) {
- q("INSERT INTO `process` (`pid`,`command`,`created`) VALUES (%d, '%s', '%s')", intval(getmypid()), dbesc($command), dbesc(datetime_convert()));
+ dba::insert('process', array('pid' => getmypid(), 'command' => $command, 'created' => datetime_convert()));
}
- q('COMMIT');
+ dba::commit();
}
/**
* @brief Remove inactive processes
*/
function remove_inactive_processes() {
- q('START TRANSACTION');
+ dba::transaction();
$r = q('SELECT `pid` FROM `process`');
if (dbm::is_result($r)) {
}
}
}
- q('COMMIT');
+ dba::commit();
}
/**
$callstack = array();
foreach ($trace AS $func) {
- $callstack[] = $func['function'];
+ if (!empty($func['class'])) {
+ $callstack[] = $func['class'].'::'.$func['function'];
+ } else {
+ $callstack[] = $func['function'];
+ }
}
return implode(', ', $callstack);