summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2009-10-08 11:55:57 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2009-10-08 11:55:57 +0200
commit806ddc1470b23a7e2c0ab8cc3dba7f6a585b4dbd (patch)
treefc246355ded82d6ddb711d73b448dd241988a541
parent55c3f987bd80ca38fa68c9eb08c1448a0329fee7 (diff)
Implement function TRACKBACKS-ABOUT.
Ignore-this: 41344fec9989ec3d6112206cc0b2f1fd darcs-hash:536611839f47ca7e67f83e38fbe49b0920c5991e
-rw-r--r--journal-content.lisp20
1 files changed, 20 insertions, 0 deletions
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)