From 6d734b62205805bfbedfd0d59420b5dce9eff01f Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Tue, 29 May 2007 16:32:15 +0200 Subject: Fix some bugs in code dealing with comments. darcs-hash:6997d919b882cba621b451631a6956b751bd008c --- journal.lisp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/journal.lisp b/journal.lisp index 880c56f..2cacea7 100755 --- a/journal.lisp +++ b/journal.lisp @@ -302,7 +302,7 @@ after another in any arbitrary order." (<:p (<:as-html (subseq text last-position))))) -(defun show-journal-entry (journal-entry &key (comments nil)) +(defun show-journal-entry (journal-entry &key (comments-p nil)) (<:div :class :journal-entry (<:h2 (<:a :href (format nil "journal.cgi?action=view&post=~D" @@ -359,7 +359,7 @@ after another in any arbitrary order." (<:as-is (format nil "~D Kommentare" (length (comments-about journal-entry))))))) - (when (not (null (comments-about journal-entry))) + (when (and comments-p (not (null (comments-about journal-entry)))) (<:div :class :journal-comments (<:h2 "Kommentare") (dolist (comment (comments-about journal-entry)) @@ -368,8 +368,7 @@ after another in any arbitrary order." (<:div :class :journal-comment (<:div :class :journal-comment-header (<:as-html (format nil "(~A) " - (format-date nil "%day.%mon.%yr, %hr:%min" date) - author)) + (format-date nil "%day.%mon.%yr, %hr:%min" date))) (<:a :href website (<:as-html (format nil "~A" author))) (<:as-html " meint: ")) @@ -401,9 +400,9 @@ after another in any arbitrary order." (<:div :id :contents (case *action* ((:index nil) - (mapc #'show-journal-entry *journal-entries*) :comments nil) + (mapc #'show-journal-entry *journal-entries*)) ((:view) - (show-journal-entry (find-entry *post-number*) :comments t))))) + (show-journal-entry (find-entry *post-number*) :comments-p t))))) (<:div :id :navigation) #+debug -- cgit v1.2.3