]> git.wh0rd.org - tt-rss.git/commitdiff
fix previous
authorAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Thu, 18 Jun 2015 09:10:22 +0000 (12:10 +0300)
committerAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Thu, 18 Jun 2015 09:10:22 +0000 (12:10 +0300)
plugins/af_sort_bayes/init.php

index c444c2202fbbeb0c9c6a7220e940536758f87a79..3958d27b266849672ef8bc416435509ecc3b078c 100644 (file)
@@ -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);