;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: July 2003
;;;;
-;;;; $Id: classes.lisp,v 1.6 2003/08/08 23:40:13 kevin Exp $
+;;;; $Id: classes.lisp,v 1.7 2003/08/10 07:38:37 kevin Exp $
;;;;
;;;; This file and Wol are Copyright (c) 2001-2003 by Kevin M. Rosenberg
;;;; *************************************************************************
"The output stream for the current request")
(defconstant +length-session-id+ 24)
+
+(defvar *req* nil "Current request")
+(defvar *ent* nil "Current entity")
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: July 2003
;;;;
-;;;; $Id: project.lisp,v 1.11 2003/08/10 05:16:52 kevin Exp $
+;;;; $Id: project.lisp,v 1.12 2003/08/10 07:38:37 kevin Exp $
;;;;
;;;; This file and Wol are Copyright (c) 2001-2003 by Kevin M. Rosenberg
;;;; *************************************************************************
(redirect-to-location url)))))
(defun dispatch-request (req ent)
+ (setq *req* req)
+ (setq *ent* ent)
(let ((proj (entity-project ent)))
(if (is-index-request req ent)
(redirect-entity (project-index proj) req ent)
(defun find-project-for-request (req)
(maphash (lambda (name project)
(declare (ignore name))
- (setq cl-user::p project)
- (setq cl-user::r req)
(when (and (eq (project-server project)
(or (request-aserve-server req)
(request-ml-server req)))
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: July 2003
;;;;
-;;;; $Id: uri.lisp,v 1.8 2003/08/10 05:16:52 kevin Exp $
+;;;; $Id: uri.lisp,v 1.9 2003/08/10 07:38:37 kevin Exp $
;;;;
;;;; This file and Wol are Copyright (c) 2003 by Kevin M. Rosenberg
;;;; *************************************************************************
(prin1-to-string (nreverse output)))
(push (compress-elem (car list)) output)
(push (cadr list) output)))
+
(defun compress-elem (elem)
"Encode a plist elem"
(push (cadr elist) output))))
(defun decompress-elem (elem)
- (case elem
- (:N :next-page)
- (:T :posted)
- (:O :object-id)
- (:S :session-id)
- (:L :lang)
- (:G :logged)
- (:C :caller)
- (:D :db)
-
- ;; For posting to lookup-func1
- (:F :func)
- (:K :key)
- (:B :subobjects)
- (:A :labels)
- (:E :english-only)
- (:R :format)
-
- (:X :xml)
- (:P :page)
+ (if (> (length (symbol-name elem)) 1)
+ elem
+ (case (char-upcase (schar (symbol-name elem ) 0))
+ (#\N :next-page)
+ (#\T :posted)
+ (#\O :object-id)
+ (#\S :session-id)
+ (#\L :lang)
+ (#\G :logged)
+ (#\C :caller)
+ (#\D :db)
+
+ ;; For posting to lookup-func1
+ (#\F :func)
+ (#\K :key)
+ (#\B :subobjects)
+ (#\A :labels)
+ (#\E :english-only)
+ (#\R :format)
+
+ (#\X :xml)
+ (#\P :page)
+
+ (otherwise elem))))
+
+
+
+
- (otherwise elem)))