X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=uri.lisp;h=e3b631d49302409a67935df1ef8c2d85208199c4;hb=b2a8ce33193d1621e9232521e779adf6a7d872f3;hp=371f04563e78e8ce5a9f968eaea7818104dd4315;hpb=de82da84115f8e2a6ad7add24cb73e7876c89a3b;p=wol.git diff --git a/uri.lisp b/uri.lisp index 371f045..e3b631d 100644 --- a/uri.lisp +++ b/uri.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: July 2003 ;;;; -;;;; $Id: uri.lisp,v 1.1 2003/07/16 16:02:21 kevin Exp $ +;;;; $Id: uri.lisp,v 1.5 2003/08/08 09:03:45 kevin Exp $ ;;;; ;;;; This file and Wol are Copyright (c) 2003 by Kevin M. Rosenberg ;;;; ************************************************************************* @@ -18,7 +18,7 @@ (defun request-decompile-uri (req ent) "returns (VALUE PAGE PLIST QUERY-ALIST)" (multiple-value-bind (page plists query) - (decode-url (request-raw-uri req)) + (decode-url (puri:uri-path (request-raw-uri req))) (when page (setf (request-page req) (base-page-name page ent))) (when plists @@ -60,63 +60,24 @@ +#+ignore (defun make-html-url (page ent &optional query-args) (make-url (concatenate 'string page ".html") :base-dir (project-prefix (entity-project ent)) :vars query-args :format :xhtml)) -(defvar *unspecified* (cons :unspecified nil)) - -(defun make-wol-url (page ent - &key (session-id *unspecified*) - (object-id *unspecified*) - (func *unspecified*) (key *unspecified*) - (subobjects *unspecified*) (labels *unspecified*) - (english-only *unspecified*) - (format *unspecified*) - (lang *unspecified*) (logged *unspecified*) - (next-page *unspecified*) (caller *unspecified*) - asp html) - (let ((plist (list :page page)) + +(defun make-wol-url (page ent &optional plist) + (let ((url-plist (append (list :page page) plist)) (prefix (project-prefix (entity-project ent)))) - (unless (eq session-id *unspecified*) - (setq plist (append plist (list :session-id session-id)))) - (unless (eq object-id *unspecified*) - (setq plist (append plist (list :object-id object-id)))) - (unless (eq lang *unspecified*) - (setq plist (append plist (list :lang lang)))) - (unless (eq logged *unspecified*) - (setq plist (append plist (list :logged logged)))) - (unless (eq func *unspecified*) - (setq plist (append plist (list :func func)))) - (unless (eq subobjects *unspecified*) - (setq plist (append plist (list :subobjects subobjects)))) - (unless (eq key *unspecified*) - (setq plist (append plist (list :key key)))) - (unless (eq labels *unspecified*) - (setq plist (append plist (list :labels labels)))) - (unless (eq english-only *unspecified*) - (setq plist (append plist (list :english-only english-only)))) - (unless (eq next-page *unspecified*) - (setq plist (append plist (list :next-page next-page)))) - (unless (eq format *unspecified*) - (setq plist (append plist (list :format format)))) - (unless (eq caller *unspecified*) - (setq plist (append plist (list :caller caller)))) - (if (and (null asp) - (parameters-null session-id object-id lang logged func subobjects - key labels english-only next-page format caller)) - (concatenate 'string prefix page ".html") + (if (null plist) + (concatenate 'string prefix page ".lsp") (concatenate 'string prefix - (if html - (concatenate 'string page ".lsp") - (concatenate 'string - +asp-header+ +plist-header+ (plist-to-url-string plist))))))) - -(defun parameters-null (&rest params) - (every #'(lambda (p) (or (null p) (eq p *unspecified*))) params)) + +asp-header+ + (concatenate 'string +plist-header+ + (plist-to-url-string url-plist)))))) ;; Property lists @@ -154,6 +115,7 @@ (:lang :l) (:logged :g) (:caller :c) + (:db :d) ;; For lookup-func1 (:func :f) @@ -191,6 +153,7 @@ (:L :lang) (:G :logged) (:C :caller) + (:D :db) ;; For posting to lookup-func1 (:F :func)