diff --git a/modules/system/controllers/EventLogs.php b/modules/system/controllers/EventLogs.php index 4b2c5538f..8e30a8e8d 100644 --- a/modules/system/controllers/EventLogs.php +++ b/modules/system/controllers/EventLogs.php @@ -10,6 +10,7 @@ use BackendMenu; use Backend\Classes\Controller; use System\Classes\ApplicationException; use System\Classes\SettingsManager; +use System\Models\EventLog; use Exception; /** @@ -41,4 +42,11 @@ class EventLogs extends Controller SettingsManager::setContext('October.System', 'event_logs'); } + public function onEmptyLog() + { + EventLog::truncate(); + Flash::success(Lang::get('system::lang.event_log.empty_success')); + return $this->listRefresh(); + } + } \ No newline at end of file diff --git a/modules/system/controllers/RequestLogs.php b/modules/system/controllers/RequestLogs.php index 59b365610..f7a78f18e 100644 --- a/modules/system/controllers/RequestLogs.php +++ b/modules/system/controllers/RequestLogs.php @@ -10,6 +10,7 @@ use BackendMenu; use Backend\Classes\Controller; use System\Classes\ApplicationException; use System\Classes\SettingsManager; +use System\Models\RequestLog; use Exception; /** @@ -41,4 +42,11 @@ class RequestLogs extends Controller SettingsManager::setContext('October.System', 'request_logs'); } + public function onEmptyLog() + { + RequestLog::truncate(); + Flash::success(Lang::get('system::lang.event_log.empty_success')); + return $this->listRefresh(); + } + } \ No newline at end of file diff --git a/modules/system/controllers/eventlogs/_list_toolbar.htm b/modules/system/controllers/eventlogs/_list_toolbar.htm index c916630a1..1207b2ce3 100644 --- a/modules/system/controllers/eventlogs/_list_toolbar.htm +++ b/modules/system/controllers/eventlogs/_list_toolbar.htm @@ -1,7 +1,9 @@ -