]> git.wh0rd.org - tt-rss.git/blobdiff - plugins/af_sort_bayes/init.php
bayes, filter: do not categorize already processed articles
[tt-rss.git] / plugins / af_sort_bayes / init.php
index f36ae9148bf3c646a646cfb61ce3efaeaf2a3886..fdb573ecde6de00a773eaca6bd784adc5675a5f3 100644 (file)
@@ -266,6 +266,10 @@ class Af_Sort_Bayes extends Plugin {
                $nbs = new NaiveBayesianStorage($owner_uid);
                $nb = new NaiveBayesian($nbs);
 
+               $ref = $nbs->getReference($article["guid"], false);
+
+               if (isset($ref["category_id"])) return $article; // already categorized
+
                $categories = $nbs->getCategories();
 
                if (count($categories) > 0) {