From 806ddc1470b23a7e2c0ab8cc3dba7f6a585b4dbd Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Thu, 8 Oct 2009 11:55:57 +0200 Subject: Implement function TRACKBACKS-ABOUT. Ignore-this: 41344fec9989ec3d6112206cc0b2f1fd darcs-hash:536611839f47ca7e67f83e38fbe49b0920c5991e --- journal-content.lisp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/journal-content.lisp b/journal-content.lisp index cf31ae6..54a2690 100644 --- a/journal-content.lisp +++ b/journal-content.lisp @@ -246,6 +246,26 @@ (declare (ignore ordered-p)) (setf (%comments-about journal-entry) new-value)) +(defmethod trackbacks-about ((journal-entry journal-entry) &key ordered-p ham-p) + #.(locally-enable-sql-reader-syntax) + (prog1 (if ordered-p + (if ham-p + (select 'journal-trackback + :where [and [= [slot-value 'journal-trackback 'entry-id] + (id-of journal-entry)] + [= [slot-value 'journal-trackback 'spam-p] + "f"]] + :order-by '([date]) + :flatp t) + (select 'journal-trackback + :where [= [slot-value 'journal-trackback 'entry-id] + (id-of journal-entry)] + :order-by '([date]) + :flatp t)) + (if ham-p + (trackbacks-about journal-entry :ordered-p t :ham-p t) + (%trackbacks-about journal-entry))) + #.(restore-sql-reader-syntax-state))) (defmethod (setf trackbacks-about) (new-value (journal-entry journal-entry) -- cgit v1.2.3