pdo->query("DELETE FROM ttrss_error_log");
}
private function log_viewer(int $page, int $severity) {
print "
";
print "
";
if (LOG_DESTINATION == "sql") {
print "
";
print "
";
print "
".__('Refresh')." ";
print "
".__('<<')." ";
print "
".T_sprintf('Page %d', $page+1)." ";
print "
".__('>>')." ";
print "
".__('Clear')." ";
print "
";
print __("Severity:") . " ";
print_select_hash("severity", $severity,
[
E_USER_ERROR => __("Errors"),
E_USER_WARNING => __("Warnings"),
E_USER_NOTICE => __("Everything")
], 'dojoType="fox.form.Select" onchange="Helpers.updateEventLog()"');
print "
"; # pull-right
print "
"; # toolbar
print '
';
$this->log_viewer($page, $severity);
} else {
print_notice("Please set LOG_DESTINATION to 'sql' in config.php to enable database logging.");
}
print "
"; # content pane
print "
"; # container
print "
"; # accordion pane
print "
";
ob_start();
phpinfo();
$info = ob_get_contents();
ob_end_clean();
print "
";
print preg_replace( '%^.*(.*).*$%ms','$1', $info);
print "
";
print "
"; # accordion pane
PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB,
"hook_prefs_tab", "prefSystem");
print "
"; #container
}
}