From fe6fd1cd39dd145adb1c479cab619a2ce6d1c3eb Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sun, 10 Aug 2003 07:39:33 +0000 Subject: [PATCH] r5485: *** empty log message *** --- classes.lisp | 5 ++++- project.lisp | 6 +++--- uri.lisp | 52 ++++++++++++++++++++++++++++++---------------------- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/classes.lisp b/classes.lisp index 965491e..2a49ec1 100644 --- a/classes.lisp +++ b/classes.lisp @@ -7,7 +7,7 @@ x;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: wol -*- ;;;; 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 ;;;; ************************************************************************* @@ -100,3 +100,6 @@ x;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: wol -*- "The output stream for the current request") (defconstant +length-session-id+ 24) + +(defvar *req* nil "Current request") +(defvar *ent* nil "Current entity") diff --git a/project.lisp b/project.lisp index 119c929..d8a4d27 100644 --- a/project.lisp +++ b/project.lisp @@ -7,7 +7,7 @@ ;;;; 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 ;;;; ************************************************************************* @@ -190,6 +190,8 @@ (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) @@ -207,8 +209,6 @@ (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))) diff --git a/uri.lisp b/uri.lisp index 1f2e224..4fe67dd 100644 --- a/uri.lisp +++ b/uri.lisp @@ -7,7 +7,7 @@ ;;;; 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 ;;;; ************************************************************************* @@ -137,6 +137,7 @@ (prin1-to-string (nreverse output))) (push (compress-elem (car list)) output) (push (cadr list) output))) + (defun compress-elem (elem) "Encode a plist elem" @@ -178,27 +179,34 @@ (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))) -- 2.34.1