1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-19 00:21:29 +00:00

add button to clear bayes database

This commit is contained in:
Andrew Dolgov
2015-06-17 16:50:21 +03:00
parent b02e8bc8f2
commit 3c43def90f
2 changed files with 60 additions and 2 deletions

View File

@@ -15,3 +15,23 @@ function bayesTrain(id, train_up) {
}
}
function bayesClearDatabase() {
try {
if (confirm(__("Clear classifier database?"))) {
var query = "backend.php?op=pluginhandler&plugin=af_sort_bayes&method=clearDatabase";
new Ajax.Request("backend.php", {
parameters: query,
onComplete: function (transport) {
notify(transport.responseText);
}
});
}
} catch (e) {
exception_error("showTrgmRelated", e);
}
}