[bknr-cvs] ksprotte changed trunk/projects/bos/web/map-browser-handler.lisp
BKNR Commits
bknr at bknr.net
Mon Sep 1 11:11:04 UTC 2008
Revision: 3757
Author: ksprotte
URL: http://bknr.net/trac/changeset/3757
MAP-BROWSER-HANDLER is more careful when appending get-parameters to CHOSEN-URL
(it now inserts a '&', if needed)
U trunk/projects/bos/web/map-browser-handler.lisp
Modified: trunk/projects/bos/web/map-browser-handler.lisp
===================================================================
--- trunk/projects/bos/web/map-browser-handler.lisp 2008-09-01 10:12:19 UTC (rev 3756)
+++ trunk/projects/bos/web/map-browser-handler.lisp 2008-09-01 11:11:04 UTC (rev 3757)
@@ -1,4 +1,4 @@
- ; please don't read this code, it is not pretty
+;; please don't read this code, it is not pretty
(in-package :bos.web)
@@ -38,9 +38,13 @@
(apply #'ensure-valid-coordinates handler-arguments)))))
(defmethod handle ((handler map-browser-handler))
- (with-query-params (chosen-url)
- (when chosen-url
- (setf (hunchentoot:session-value :chosen-url) chosen-url)))
+ (flet ((append-&-if-needed (string)
+ (if (char= #\& (char string (1- (length string))))
+ string
+ (concatenate 'string string "&"))))
+ (with-query-params (chosen-url)
+ (when chosen-url
+ (setf (hunchentoot:session-value :chosen-url) (append-&-if-needed chosen-url)))))
(with-query-params (view-x view-y)
(destructuring-bind (&optional click-x click-y) (decode-ismap-query-string)
(destructuring-bind (&optional point-x point-y) (decode-coords-in-handler-path handler)
More information about the Bknr-cvs
mailing list