Sat Jun 18 23:14:59 UTC 2011 pix@kepibu.org
* Bugfix: if we manually classify an URL as spam, don't then mark the page that
had that URL as known-good.
diff -rN -u old-claki/claki.lisp new-claki/claki.lisp
--- old-claki/claki.lisp 2013-07-22 03:24:24.000000000 +0000
+++ new-claki/claki.lisp 2013-07-22 03:24:24.000000000 +0000
@@ -81,7 +81,7 @@
(setf (gethash url *spam-urls*) t))
(t nil))))
-(defun request-classification (url)
+(defun request-classification (url &optional page version)
(restart-case (error 'simple-error :format-control "Please classify the URL ~s."
:format-arguments (list url))
(mark-url-okay ()
@@ -92,9 +92,13 @@
(setf (gethash (url-domain url) *okay-urls*) t))
(mark-url-spam ()
:report "Mark this URL as spam."
+ (when (and page version)
+ (pushnew (list page version) *has-spam* :test #'equal))
(setf (gethash url *spam-urls*) t))
(mark-domain-spam ()
:report "Mark the domain as spam."
+ (when (and page version)
+ (pushnew (list page version) *has-spam* :test #'equal))
(setf (gethash (url-domain url) *spam-urls*) t))
(classify-later ()
:report "Don't classify this URL yet."
@@ -107,7 +111,7 @@
(gethash (url-domain url) *okay-urls*)
(gethash url *spam-urls*)
(gethash (url-domain url) *spam-urls*)
- (request-classification url))
+ (request-classification url page version))
:collect (list url page version))))
(defun mark-known-goods ()