From 446f4615bf3b2833b898cfc7b320c1aa94e6dd92 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sun, 18 Sep 2022 17:53:03 -0600 Subject: [PATCH] Bug fix use column instead of field If updated in the last few days then you need should clear the file cache. Also disabled event_guard_log_allowed until there is a setting to enable or disable it. Update the source code cd /var/www/fusionpbx rm /var/cache/fusionpbx/* service event_guard restart --- app/event_guard/resources/service/event_guard.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/event_guard/resources/service/event_guard.php b/app/event_guard/resources/service/event_guard.php index f0f5481bb1..bf85b80e60 100644 --- a/app/event_guard/resources/service/event_guard.php +++ b/app/event_guard/resources/service/event_guard.php @@ -467,6 +467,7 @@ } //allow access for addresses that have been unblocked + /* if (event_guard_log_allowed($ip_address)) { //save address to the cache as allowed $cache->set("switch:allowed:".$ip_address, 'true'); @@ -479,6 +480,7 @@ //return boolean true return true; } + */ //allow access if the cidr address is allowed if (access_control_allowed($ip_address)) { @@ -594,7 +596,7 @@ $sql .= "and result = 'success' "; $parameters['ip_address'] = $ip_address; $database = new database; - $user_log_count = $database->select($sql, $parameters, 'field'); + $user_log_count = $database->select($sql, $parameters, 'column'); unset($database); //debug info @@ -629,7 +631,7 @@ $sql .= "and log_status = 'unblocked' "; $parameters['ip_address'] = $ip_address; $database = new database; - $user_log_count = $database->select($sql, $parameters, 'field'); + $user_log_count = $database->select($sql, $parameters, 'column'); unset($database); //debug info