summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-05-29 16:32:15 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-05-29 16:32:15 +0200
commit6d734b62205805bfbedfd0d59420b5dce9eff01f (patch)
treed7a0b2257dc5d03e97447b784f0e1b674b1630b0
parentaa063a057047c9d166a79a05c2e7cf7cf43f2567 (diff)
Fix some bugs in code dealing with comments.
darcs-hash:6997d919b882cba621b451631a6956b751bd008c
-rwxr-xr-xjournal.lisp11
1 files 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