From: Andrew Dolgov Date: Thu, 18 Jun 2015 09:10:22 +0000 (+0300) Subject: fix previous X-Git-Tag: 16.3~281 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=13167d2a2fa9d12f78e687faa0778cca8a5b5c79;p=tt-rss.git fix previous --- diff --git a/plugins/af_sort_bayes/init.php b/plugins/af_sort_bayes/init.php index c444c220..3958d27b 100644 --- a/plugins/af_sort_bayes/init.php +++ b/plugins/af_sort_bayes/init.php @@ -267,6 +267,11 @@ class Af_Sort_Bayes extends Plugin { $result = $this->dbh->query("SELECT id FROM {$this->sql_prefix}_references WHERE document_id = '" . $this->dbh->escape_string($article['guid_hashed']) . "'"); + if (db_num_rows($result) != 0) { + _debug("bayes: article already categorized"); + return $article; + } + $nbs = new NaiveBayesianStorage($owner_uid); $nb = new NaiveBayesian($nbs);