diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index abd9b98c8..163b1e368 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -619,20 +619,6 @@ function getLogHTML() { if ( canView('System') ) { if ( ZM\logToDatabase() > ZM\Logger::NOLOG ) { - if ( ! ZM_RUN_AUDIT ) { - # zmaudit can clean the logs, but if we aren't running it, then we should clean them regularly - if ( preg_match('/^\d+$/', ZM_LOG_DATABASE_LIMIT) ) { - # Number of lines, instead of an interval - $rows = dbFetchOne('SELECT Count(*) AS `Rows` FROM `Logs`', 'Rows'); - if ( $rows > ZM_LOG_DATABASE_LIMIT ) { - dbQuery('DELETE low_priority FROM `Logs` ORDER BY `TimeKey` ASC LIMIT ?', array($rows - ZM_LOG_DATABASE_LIMIT)); - } - } else if ( preg_match('/^\d\s*(hour|minute|day|week|month|year)$/', ZM_LOG_DATABASE_LIMIT, $matches) ) { - dbQuery('DELETE FROM `Logs` WHERE `TimeKey` < unix_timestamp( NOW() - interval '.ZM_LOG_DATABASE_LIMIT.') LIMIT 100'); - } else { - ZM\Error('Potentially invalid value for ZM_LOG_DATABASE_LIMIT: ' . ZM_LOG_DATABASE_LIMIT); - } - } $logstate = logState(); $class = ($logstate == 'ok') ? 'text-success' : ($logstate == 'alert' ? 'text-warning' : (($logstate == 'alarm' ? 'text-danger' : ''))); $result .= ''.PHP_EOL;