[bknr-cvs] hans changed trunk/projects/bos/m2/

BKNR Commits bknr at bknr.net
Tue Oct 14 12:21:45 UTC 2008


Revision: 3989
Author: hans
URL: http://bknr.net/trac/changeset/3989

Change CONTRACT-CERTIFICATES-GENERATED-P so that only the download
certificate is checked for existence.  The print certificate is
deleted after is has been mailed out.

U   trunk/projects/bos/m2/cert-daemon.lisp
U   trunk/projects/bos/m2/m2.lisp

Modified: trunk/projects/bos/m2/cert-daemon.lisp
===================================================================
--- trunk/projects/bos/m2/cert-daemon.lisp	2008-10-14 10:37:34 UTC (rev 3988)
+++ trunk/projects/bos/m2/cert-daemon.lisp	2008-10-14 12:21:45 UTC (rev 3989)
@@ -47,6 +47,12 @@
         (format "Error generating certificate from file ~A: ~A~%" fdf-pathname e)))))
 
 (defun generate-certs ()
+  ;; Mail certificates need to be generated first, then download-only
+  ;; certificates, because the CONTRACT-CERTIFICATES-GENERATED-P
+  ;; function only checks for the existence of the download
+  ;; certificate file.  The mail certificates are deleted after they
+  ;; have been sent by mail, so we cannot check for both files in said
+  ;; routine.
   (fill-forms *cert-mail-directory* *cert-mail-template*)
   (fill-forms *cert-download-directory* *cert-download-template*)
   (fill-forms *receipt-mail-directory* *receipt-mail-template*)

Modified: trunk/projects/bos/m2/m2.lisp
===================================================================
--- trunk/projects/bos/m2/m2.lisp	2008-10-14 10:37:34 UTC (rev 3988)
+++ trunk/projects/bos/m2/m2.lisp	2008-10-14 12:21:45 UTC (rev 3989)
@@ -359,9 +359,7 @@
   (format nil "/certificate/~A" (store-object-id contract)))
 
 (defmethod contract-certificates-generated-p (contract)
-  (and (probe-file (contract-pdf-pathname contract))
-       (or (contract-download-only-p contract)
-           (probe-file (contract-pdf-pathname contract :print t)))))
+  (probe-file (contract-pdf-pathname contract)))
 
 (defmethod contract-delete-certificate-files (contract)
   (ignore-errors





More information about the Bknr-cvs mailing list