diff --git a/admin/systemsortprocess.php b/admin/systemsortprocess.php index 5d7e042e..da575052 100644 --- a/admin/systemsortprocess.php +++ b/admin/systemsortprocess.php @@ -206,7 +206,7 @@ while (!is_process_killed($process_id)) //check if process killed every $sleepin sleep($sleepinterval); } - process_clear_log($process_id); + process_clear_log(); } disable_systemsort(); diff --git a/functions/functions.process.php b/functions/functions.process.php index 9b8f0b85..325c2ad5 100644 --- a/functions/functions.process.php +++ b/functions/functions.process.php @@ -248,25 +248,21 @@ function process_get_last_data($type = 1) /** - * Don't let the log get too big for this process + * Don't let the log get too big * - * @param int $process_id The process id - * * @author Adam Zammit * @since 2012-09-27 */ -function process_clear_log($process_id) +function process_clear_log() { global $db; $sql = - "DELETE FROM process_log WHERE process_id = '$process_id' AND - process_log_id NOT IN ( + "DELETE FROM process_log WHERE process_log_id NOT IN ( SELECT process_log_id FROM ( SELECT process_log_id FROM process_log - WHERE process_id = '$process_id' ORDER BY process_log_id DESC LIMIT " . (PROCESS_LOG_LIMIT * 3) . " ) x diff --git a/functions/functions.voip.php b/functions/functions.voip.php index 03e3ddb0..50f1df64 100644 --- a/functions/functions.voip.php +++ b/functions/functions.voip.php @@ -621,10 +621,6 @@ class voipWatch extends voip { $time = time(); } - if ($process_id) { - process_clear_log($process_id); - } - } while ($this->keepWatching); }