dbh->query("DELETE FROM ttrss_error_log"); } function index() { print "
"; print "
"; if (LOG_DESTINATION == "sql") { $result = $this->dbh->query("SELECT errno, errstr, filename, lineno, created_at, login, context FROM ttrss_error_log LEFT JOIN ttrss_users ON (owner_uid = ttrss_users.id) ORDER BY ttrss_error_log.id DESC LIMIT 100"); print " "; print "  "; print "

"; print ""; while ($line = $this->dbh->fetch_assoc($result)) { print ""; foreach ($line as $k => $v) { $line[$k] = htmlspecialchars($v); } print ""; print ""; print ""; print ""; print ""; print ""; } print "
".__("Error")." ".__("Filename")." ".__("Message")." ".__("User")." ".__("Date")."
" . Logger::$errornames[$line["errno"]] . " (" . $line["errno"] . ")" . $line["filename"] . ":" . $line["lineno"] . "" . $line["errstr"] . "
" . nl2br($line["context"]) . "
" . make_local_datetime( $line["created_at"], false) . "
"; } else { print_notice("Please set LOG_DESTINATION to 'sql' in config.php to enable database logging."); } print "

"; PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB, "hook_prefs_tab", "prefSystem"); print "
"; #container } }