return array_search($method, $csrf_ignored) !== false;
}
+ function clearLog() {
+ $this->dbh->query("DELETE FROM ttrss_error_log");
+ }
+
function index() {
print "<div dojoType=\"dijit.layout.AccordionContainer\" region=\"center\">";
print "<button dojoType=\"dijit.form.Button\"
onclick=\"updateSystemList()\">".__('Refresh')."</button> ";
+ print " <button dojoType=\"dijit.form.Button\"
+ onclick=\"clearSqlLog()\">".__('Clear log')."</button> ";
+
print "<p><table width=\"100%\" cellspacing=\"10\" class=\"prefErrorLog\">";
print "<tr class=\"title\">
exception_error("clearPluginData", e);
}
}
+
+function clearSqlLog() {
+
+ if (confirm(__("Clear all messages in the error log?"))) {
+
+ notify_progress("Loading, please wait...");
+ var query = "?op=pref-system&method=clearLog";
+
+ new Ajax.Request("backend.php", {
+ parameters: query,
+ onComplete: function(transport) {
+ updateSystemList();
+ } });
+
+ }
+}
+
+