summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2009-10-08 19:54:42 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2009-10-08 19:54:42 +0200
commit4bd2c76c0af0370c7788a8bc6f640c8f0369c24e (patch)
tree0b1c14281bba51a7f9ce5829e7c58a7e35151fcf
parenta4e8b49e3d5f21d416b554d935a66d52f3cd08c0 (diff)
Improve Atom publishing API conformance.
Ignore-this: 35f3d7d6ce625b2c66dfbfdcd2e6c53a darcs-hash:d8fa4f56187060dc4a5cc513c0c675110c2eca0f
-rwxr-xr-xjournal.lisp13
-rw-r--r--main.lisp2
2 files changed, 11 insertions, 4 deletions
diff --git a/journal.lisp b/journal.lisp
index d8a4430..b0d3ec5 100755
--- a/journal.lisp
+++ b/journal.lisp
@@ -171,7 +171,7 @@
#.(restore-sql-reader-syntax-state))
-(defun show-atom-feed (&key include-edit-links)
+(defun show-atom-feed (&key include-edit-links full-content)
#.(locally-enable-sql-reader-syntax)
(revalidate-cache-or-die "application/atom+xml; charset=UTF-8")
(http-add-header "Last-Modified" (http-timestamp (compute-journal-last-modified-date)))
@@ -211,7 +211,13 @@
(when include-edit-links
(with-tag ("link" `(("rel" "service.post")
("type" "application/atom+xml")
- ("href" ,(link-to :view-atom-entry :absolute t))))))
+ ("href" ,(link-to :view-atom-entry :absolute t)))))
+ (with-tag ("link" `(("rel" "service.feed")
+ ("type" "application/atom+xml")
+ ("href" ,(link-to :view-atom-entry :absolute t)))))
+ #+(or) (with-tag ("link" `(("rel" "service.categories")
+ ("type" "application/atom+xml")
+ ("href" ,(link-to :view-atom-entry :absolute t))))))
(let ((number 0))
(dolist (journal-entry (select 'journal-entry
@@ -224,7 +230,8 @@
(> (last-modification-of journal-entry)
(- (get-universal-time)
(* 30 24 60 60))))
- (<= number 8))
+ (<= number 8)
+ full-content)
:include-edit-links include-edit-links)
(incf number))))))
#.(restore-sql-reader-syntax-state))
diff --git a/main.lisp b/main.lisp
index 39c4ccb..96fd57b 100644
--- a/main.lisp
+++ b/main.lisp
@@ -149,7 +149,7 @@
(cond ((string= *method* "GET")
(if *post-number*
(show-atom-entry)
- (show-atom-feed :include-edit-links t)))
+ (show-atom-feed :include-edit-links t :full-content t)))
((member *method* '("POST" "PUT") :test 'equal)
(with-transaction ()
(let* ((entry (if (string= *method* "PUT")