";
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 "
".__("Error")." |
".__("Filename")." |
".__("Message")." |
".__("User")." |
".__("Date")." |
";
while ($line = $this->dbh->fetch_assoc($result)) {
print "";
foreach ($line as $k => $v) {
$line[$k] = htmlspecialchars($v);
}
print "" . Logger::$errornames[$line["errno"]] . " (" . $line["errno"] . ") | ";
print "" . $line["filename"] . ":" . $line["lineno"] . " | ";
print "" . $line["errstr"] . " " . nl2br($line["context"]) . " | ";
print "" . $line["login"] . " | ";
print "" .
make_local_datetime(
$line["created_at"], false) . " | ";
print "
";
}
print "
";
} 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 "