summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-09-30 00:45:33 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-09-30 00:45:33 +0200
commit033516172c84bc772c7deeea8875445b4e7d48a2 (patch)
tree8ea45022b42dad37c50e4fda3a7d288b1dc17931
parent6392eaedc789a57cdddb123456ef1a0affb81713 (diff)
Fix comment viewing.
darcs-hash:abb4db3e848ccfb0b9c90e8648460d25122e66aa
-rw-r--r--journal-content.lisp11
-rwxr-xr-xjournal.lisp3
2 files changed, 6 insertions, 8 deletions
diff --git a/journal-content.lisp b/journal-content.lisp
index 9140a51..2991ec4 100644
--- a/journal-content.lisp
+++ b/journal-content.lisp
@@ -145,12 +145,11 @@
(defmethod comments-about ((journal-entry journal-entry) &key ordered-p)
#.(locally-enable-sql-reader-syntax)
(prog1 (if ordered-p
- (mapcar #'car
- (select 'journal-comment 'journal-entry
- :where [= [slot-value 'journal-comment 'entry-id]
- [slot-value 'journal-entry 'id]]
- :order-by '([journal-comment.date])
- :flatp t))
+ (select 'journal-comment
+ :where [= [slot-value 'journal-comment 'entry-id]
+ (id-of journal-entry)]
+ :order-by '([date])
+ :flatp t)
(%comments-about journal-entry))
#.(restore-sql-reader-syntax-state)))
diff --git a/journal.lisp b/journal.lisp
index bc7bd2b..2ca1919 100755
--- a/journal.lisp
+++ b/journal.lisp
@@ -170,8 +170,7 @@
(when (and comments-p (not (null (comments-about journal-entry))))
(<:div :class :journal-comments
(<:h2 "Kommentare")
- (dolist (comment (comments-about journal-entry
- :ordered-p t))
+ (dolist (comment (comments-about journal-entry :ordered-p t))
(with-slots (author body date id email website)
comment
(<:div :class :journal-comment