From 5d0b3520f01f55d09ed05927f1f4aa43df9e5bc6 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Fri, 30 Oct 2009 21:51:04 +0100 Subject: Implement metaWeblog.getCategories and metaWeblog.getRecentPosts. Ignore-this: 38094bb5aff14dc701398aa871e22116 darcs-hash:607981d7d7dff2945b8a1824c152a365ea28ceea --- journal-content.lisp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'journal-content.lisp') diff --git a/journal-content.lisp b/journal-content.lisp index 3d286b3..29f01e4 100644 --- a/journal-content.lisp +++ b/journal-content.lisp @@ -279,16 +279,19 @@ (setf (%trackbacks-about journal-entry) new-value)) -(defun make-journal-entry-id () +(defun find-largest-post-id () #.(locally-enable-sql-reader-syntax) (prog1 - (1+ (or (single-object (select [max [slot-value 'journal-entry 'id]] - :from [journal-entry] - :flatp t)) - -1)) + (single-object (select [max [slot-value 'journal-entry 'id]] + :from [journal-entry] + :flatp t)) #.(restore-sql-reader-syntax-state))) +(defun make-journal-entry-id () + (1+ (or (find-largest-post-id) -1))) + + (defun make-journal-comment-id () #.(locally-enable-sql-reader-syntax) (prog1 -- cgit v1.2.3