public static $errornames = array(
1 => 'E_ERROR',
2 => 'E_WARNING',
+ 4 => 'E_PARSE',
8 => 'E_NOTICE',
+ 16 => 'E_CORE_ERROR',
+ 32 => 'E_CORE_WARNING',
+ 64 => 'E_COMPILE_ERROR',
+ 128 => 'E_COMPILE_WARNING',
256 => 'E_USER_ERROR',
512 => 'E_USER_WARNING',
1024 => 'E_USER_NOTICE',
expire_cached_files($debug);
expire_lock_files($debug);
+ expire_error_log($link, $debug);
$nf = 0;
return $doc->saveXML($node);
}
+ function expire_error_log($link, $debug) {
+ if ($debug) _debug("Removing old error log entries...");
+
+ if (DB_TYPE == "pgsql") {
+ db_query($link, "DELETE FROM ttrss_error_log
+ WHERE created_at < NOW() - INTERVAL '7 days'");
+ } else {
+ db_query($link, "DELETE FROM ttrss_error_log
+ WHERE created_at < DATE_SUB(NOW(), INTERVAL 7 DAY)");
+ }
+
+ }
+
function expire_lock_files($debug) {
if ($debug) _debug("Removing old lock files...");
table.prefErrorLog tr.errrow td.errno {
font-style : italic;
+ font-weight : bold;
white-space : nowrap;
}
+
+table.prefErrorLog td.filename, table.prefErrorLog td.login, table.prefErrorLog td.timestamp {
+ color : gray;
+}
+