From 65a09c67a0e2294dcaa7e1e1986af2d480b93f0d Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 8 Aug 2016 07:14:40 +0200 Subject: [PATCH] Bugfix: proc_run hadn't worked anymore due to the priority changes --- boot.php | 3 ++- include/dba.php | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 1beba74a07..0e56e74400 100644 --- a/boot.php +++ b/boot.php @@ -571,6 +571,7 @@ class App { $this->performance["start"] = microtime(true); $this->performance["database"] = 0; + $this->performance["database_write"] = 0; $this->performance["network"] = 0; $this->performance["file"] = 0; $this->performance["rendering"] = 0; @@ -1263,7 +1264,7 @@ class App { function proc_run($args) { // Add the php path if it is a php call - if (count($args) && $args[0] === 'php') + if (count($args) && ($args[0] === 'php' OR is_int($args[0]))) $args[0] = ((x($this->config,'php_path')) && (strlen($this->config['php_path'])) ? $this->config['php_path'] : 'php'); // add baseurl to args. cli scripts can't construct it diff --git a/include/dba.php b/include/dba.php index 3484ac6683..b0927265be 100644 --- a/include/dba.php +++ b/include/dba.php @@ -107,6 +107,9 @@ class dba { $a->save_timestamp($stamp1, "database"); + if (strtolower(substr($sql, 0, 6)) != "select") + $a->save_timestamp($stamp1, "database_write"); + if(x($a->config,'system') && x($a->config['system'],'db_log')) { if (($duration > $a->config["system"]["db_loglimit"])) { $duration = round($duration, 3); -- 2.39.5