(spam-ifile-register-with-ifile): ditto
authorTeodor Zlatanov <tzz@lifelogs.com>
Thu, 9 Jan 2003 21:09:04 +0000 (21:09 +0000)
committerTeodor Zlatanov <tzz@lifelogs.com>
Thu, 9 Jan 2003 21:09:04 +0000 (21:09 +0000)
lisp/ChangeLog
lisp/spam.el

index 9b085a0..0ce6d06 100644 (file)
@@ -2,6 +2,7 @@
 
        * spam.el (spam-check-ifile): fixed call-process-region to use the
        db parameter only if it's set
+       (spam-ifile-register-with-ifile): ditto
 
 2002-01-09  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
index aaa69da..e11115a 100644 (file)
@@ -588,13 +588,17 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
   "Register an article, given as a string, with a category.
 Uses `gnus-newsgroup-name' if category is nil (for ham registration)."
   (when (stringp article-string)
-    (let ((category (or category gnus-newsgroup-name)))
+    (let ((category (or category gnus-newsgroup-name))
+          (db-param (spam-get-ifile-database-parameter)))
       (with-temp-buffer
        (insert-string article-string)
-       (call-process-region (point-min) (point-max) spam-ifile-path 
-                            nil nil nil 
-                            "-h" "-i" category 
-                            (spam-get-ifile-database-parameter))))))
+       (if db-param
+            (call-process-region (point-min) (point-max) spam-ifile-path 
+                                 nil nil nil 
+                                 "-h" "-i" category db-param)
+          (call-process-region (point-min) (point-max) spam-ifile-path 
+                               nil nil nil 
+                               "-h" "-i" category))))))
 
 (defun spam-ifile-register-spam-routine ()
   (spam-generic-register-routine