summaryrefslogtreecommitdiff
path: root/plugins/af_sort_bayes/lib
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2015-06-17 18:53:53 +0300
committerAndrew Dolgov <[email protected]>2015-06-17 18:53:53 +0300
commit08cfcba417de0341322a913a7a717b878231a17b (patch)
tree1ea0dc137a858d4e989cd1fd1bcb1237ce779d59 /plugins/af_sort_bayes/lib
parent3dcd00e4c42989ec1834c77157314b315377b1a9 (diff)
switch to three different bayes categories
Diffstat (limited to 'plugins/af_sort_bayes/lib')
-rw-r--r--plugins/af_sort_bayes/lib/class.naivebayesianstorage.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/af_sort_bayes/lib/class.naivebayesianstorage.php b/plugins/af_sort_bayes/lib/class.naivebayesianstorage.php
index 4727705ef..73c1ee4c6 100644
--- a/plugins/af_sort_bayes/lib/class.naivebayesianstorage.php
+++ b/plugins/af_sort_bayes/lib/class.naivebayesianstorage.php
@@ -84,6 +84,17 @@
return false;
}
+ function getCategoryById($category_id) {
+ $rs = $this->con->query("SELECT category FROM ttrss_plugin_af_sort_bayes_categories WHERE id = '" .
+ (int)$category_id . "' AND owner_uid = " . $this->owner_uid);
+
+ if ($this->con->num_rows($rs) != 0) {
+ return $this->con->fetch_result($rs, 0, "category");
+ }
+
+ return false;
+ }
+
/** see if the word is an already learnt word.
@return bool
@param string word