Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Some fixups to recent changes

  • Loading branch information...
commit f161dca6acfede2b13a881a673c41b7da0f7deff 1 parent 3f30d3f
@vsedach authored
Showing with 14 additions and 13 deletions.
  1. +1 −1  src/accounts.lisp
  2. +7 −7 src/article.lisp
  3. +6 −5 src/recent-changes.lisp
View
2  src/accounts.lisp
@@ -23,7 +23,7 @@
(:metaclass persistent-class))
(defmethod link-to ((account account))
- #/site/account?name=${(name account)})
+ #/site/account?name={(name account)})
;;; passwords
View
14 src/article.lisp
@@ -76,7 +76,7 @@
(defclass revision (store-object)
((article :initarg :article
- :reader revision-article)
+ :reader article)
(author :initarg :author
:reader author
:index-type hash-index
@@ -90,7 +90,7 @@
(:metaclass persistent-class))
(defun revision-path (revision)
- #?"${*datadir*}articles/${(uri-encode (canonical-title (revision-article revision)))}/${(date revision)}")
+ #?"${*datadir*}articles/${(uri-encode (canonical-title (article revision)))}/${(date revision)}")
(defun revision-content (revision)
(alexandria:read-file-into-string (revision-path revision)))
@@ -120,7 +120,7 @@
(setf (category-list article) (mapcar #'category-keyword categories)))
(defun render-revision (revision)
- (let ((title (title (revision-article revision))))
+ (let ((title (title (article revision))))
(princ (generate-html-from-markup revision) *html-stream*)
#H[<div id="footer">
<a href="/${title}">Current version</a>
@@ -137,7 +137,7 @@
(render-revision (find-revision id)))
(defmethod link-to ((revision revision))
- #/site/view-revision?id=${(store-object-id revision)})
+ #/site/view-revision?id={(store-object-id revision)})
;;; article history
@@ -173,8 +173,8 @@
(defpage /site/compare-revisions () (old diff)
(let ((old-revision (find-revision old))
(diff-revision (find-revision diff)))
- (setf *title* (title (revision-article old-revision)))
- #H[<h1>${(title (revision-article old-revision))}</h1>
+ (setf *title* (title (article old-revision)))
+ #H[<h1>${(title (article old-revision))}</h1>
<table class="diff">
<colgroup>
<col class="diff-marker"> <col class="diff-content">
@@ -231,4 +231,4 @@
;; (render-revision (latest-content article))
;; (progn (setf (return-code*) 404)
;; #H[<h1>Cliki2 does not have an article with this exact name</h1>
-;; <a href="$(#/site/edit-article?title=${})">Create</a>]))))
+;; <a href="$(#/site/edit-article?title={})">Create</a>]))))
View
11 src/recent-changes.lisp
@@ -20,8 +20,9 @@
<a href="$(#/site/feed/rss.xml)">RSS feed</a>
<ul>] (do-recent-revisions
(lambda (revision)
- #H[<li><a href="${(link-to revision)}">${(date revision)}</a>
- ${(title (revision-article revision))} - ${(summary revision)}
+ #H[<li><a href="${(link-to revision)}">${(hunchentoot:rfc-1123-date (date revision))}</a>
+ <a href="${(link-to (article revision))}">${(title (article revision))}</a>
+ - ${(summary revision)}
<a href="${(link-to (author revision))}">${(name (author revision))}</a>
</li>]))
#H[</ul>])
@@ -41,10 +42,10 @@
(do-recent-revisions
(lambda (revision)
#H[<item>
- <title>${(name (author revision))}: ${(title (revision-article revision))}</title>
- <link>${(link-to (revision-article revision))}</link>
+ <title>${(name (author revision))}: ${(title (article revision))}</title>
+ <link>${(link-to (article revision))}</link>
<description>${(summary revision)}</description>
- <pubDate>${(date revision)}</pubDate>
+ <pubDate>${(hunchentoot:rfc-1123-date (date revision))}</pubDate>
</item>]))
#H[</channel>
Please sign in to comment.
Something went wrong with that request. Please try again.