commit 856d71f5b17c58c2a7cb662480d0c4cb0a6affb3
parent 068d026b1c6b803884111ae27dafdd12c3990872
Author: tomas <tomas@logand.com>
Date: Thu, 22 Jul 2010 19:36:10 +0200
picowiki.l updated
Diffstat:
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/picowiki.l b/picowiki.l
@@ -160,9 +160,9 @@
# (prin "<sup>β</sup>")))
(de <ilink> (Page)
(if (info (pageFile Page))
- (<href2> 'i Page (pack "?" Page))
+ (<href2> 'i Page Page)
(ht:Prin Page)
- (<href2> 'i "?" (pack "?@" Page))))
+ (<href2> 'i "?" (pack Page "?e"))))
(de markup (Lst Par)
(for (I . P) Lst
@@ -290,8 +290,7 @@
(when @N (pack " -- " @N))))
(list 'pubDate NIL (httpDate2 (strDat @D) ($tim @T)))
(list 'link NIL
- (pack "http://" *Host "/picoWiki?"
- (ht:Fmt (pack (cdr (chop (pageUrl @P 'view))))))))))
+ (pack "http://" *Host "/picoWiki/" (ht:Fmt (pageUrl @P 'view)))))))
(de rss (Page)
(httpHead "text/xml; charset=utf-8" 0)
@@ -302,7 +301,7 @@
(make
(link 'channel NIL
'(title NIL "picoWiki Changes")
- (list 'link NIL (pack "http://" *Host "/picoWiki?Changes"))
+ (list 'link NIL (pack "http://" *Host "/picoWiki/Changes"))
'(description NIL "picoWiki Changes"))
(let F (pageFile "Changes")
(when (info F)
@@ -374,11 +373,10 @@
(pack "picoWiki: " Page)
(pack "http://" *Host "/picoWiki/picoWiki.css") NIL
#==
- (<form> "post"
+ (<form> "post" (pageUrl Page 'search)
(<div> NIL
- (pageUrl Page 'search)
"picoWiki: the picoLisp Wiki"
- " | " (<href2> 'i "Home" (pageUrl NIL 'view))
+ " | " (<href2> 'i "Home" (pageUrl "picoWiki" 'view))
" " (<href2> 'i "Changes" (pageUrl "Changes" 'view))
" " (<href2> 'i "Formatting" (pageUrl "Formatting" 'view))
" " (<href2> 'i "Sandbox" (pageUrl "Sandbox" 'view))
@@ -419,12 +417,12 @@
(<sup>
(<href2> 'e "V"
(pack "http://feedvalidator.org/check.cgi?url="
- "http://" *Host "/picoWiki" (pageUrl "rss" 'view))))
+ "http://" *Host "/picoWiki/" (pageUrl "rss" 'view))))
(prin " XHTML")
(<sup>
(<href2> 'e "V"
(pack "http://validator.w3.org/check?uri="
- "http://" *Host "/picoWiki" (pageUrl Page 'view)))))
+ "http://" *Host "/picoWiki/" (pageUrl Page 'view)))))
(<p> NIL
"picoWiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively"))))))
@@ -491,19 +489,21 @@
(de pageUrl (Page Mode)
(case Mode
(source (pack "/picoWiki/pages/" Page ".txt"))
- (view (pack "?" Page))
- (edit (pack "?@" Page))
- (search "?~")))
+ (view Page)
+ (edit (pack Page "?e"))
+ (search "?s")))
(de cookies ()
(mapcar '((X) (mapcar pack (split (chop X) "=")))
(mapcar pack (split (chop (sys "HTTP_COOKIE")) ";"))))
+# P (or (if (pre? "@" Q) (pack (cdr (chop Q))) Q) "picoWiki") #####
+# E (pre? "@" Q)) ###
(let (M (sys "REQUEST_METHOD")
Q (sys "QUERY_STRING")
C (cookies)
- P (or (if (pre? "@" Q) (pack (cdr (chop Q))) Q) "picoWiki")
- E (pre? "@" Q))
+ P (or (pack (cdr (chop (sys "PATH_INFO")))) "picoWiki")
+ E (= "e" Q))
(setq P (_htDecode (chop P)))
(let? N (cadr (find '((X) (= (car X) "picoWiki.n")) C))
(setq *N N)
@@ -526,6 +526,6 @@
(cookie "picoWiki.n" (when *R *N))
(render P E T))
(writePage P *T *S *N)
- (redirect "?" P)))))
+ (redirect P)))))
(bye)