diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2009-12-03 14:10:31 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2009-12-03 14:10:31 +0100 |
commit | 01078adf81ec2e346aa3e8ca02d7fb53302984cc (patch) | |
tree | 373f5f924e5925954fd8f44cd9de75efb445cb61 | |
parent | 491e85b4e91122d3c536c9e6fc3749ed0c94bd8c (diff) |
Fix database access when moderating comments and trackbacks.
Ignore-this: ab9c17fae83025673a3d8287baadef6c
darcs-hash:5958fdbbcc2cd9f9891b4d59d7caa6e0a9897f7d
-rw-r--r-- | main.lisp | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -157,7 +157,13 @@ (acceptp (getf *query* :acceptp nil)) (table (cond ((string= type "trackback") 'journal_trackback) ((string= type "pingback") 'journal_pingback) - (t 'journal_comment)))) + (t 'journal_comment))) + (class (intern (map 'string (lambda (c) + (case c + (#\_ #\-) + (otherwise c))) + (symbol-name table)) + (find-package "MULK.JOURNAL")))) (with-transaction () (when (and id type acceptp (string= acceptp "t")) (update-records table @@ -166,7 +172,7 @@ ;; Update static files. (update-index-page) (update-comment-feed) - (let ((comment/trackback (single-object (select table + (let ((comment/trackback (single-object (select class :where [= [id] id] :flatp t)))) (update-journal-entry-page (entry-of comment/trackback)))) |