]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Chance to train unknown
authorEvan Prodromou <evan@status.net>
Wed, 16 May 2012 16:26:29 +0000 (12:26 -0400)
committerEvan Prodromou <evan@status.net>
Wed, 16 May 2012 16:26:29 +0000 (12:26 -0400)
plugins/ActivitySpam/ActivitySpamPlugin.php

index e9c481e3bc7487adb3f3f72e002165c5fd1e1bb5..978f8b4cf8cf3c6f59b1a56bdfc189aa0be4182f 100644 (file)
@@ -188,8 +188,9 @@ class ActivitySpamPlugin extends Plugin
                 $score = Spam_score::staticGet('notice_id', $notice->id);
 
                 if (empty($score)) {
-                    $this->debug("No score for notice " . $notice->id);
-                    // XXX: show a question-mark or something
+                    // If it's empty, we can train it.
+                    $form = new TrainSpamForm($out, $notice);
+                    $form->show();
                 } else if ($score->is_spam) {
                     $form = new TrainHamForm($out, $notice);
                     $form->show();