Revision: 3651 Author: ksprotte URL: http://bknr.net/trac/changeset/3651
fixed content-language-chooser to use script-name instead of request-uri
U trunk/projects/bos/web/web-utils.lisp
Modified: trunk/projects/bos/web/web-utils.lisp =================================================================== --- trunk/projects/bos/web/web-utils.lisp 2008-07-27 10:07:06 UTC (rev 3650) +++ trunk/projects/bos/web/web-utils.lisp 2008-07-28 08:47:01 UTC (rev 3651) @@ -39,17 +39,19 @@ (cadr (assoc language-short-name (website-languages) :test #'equal)))
(defun content-language-chooser () + "Note that in the current implementation other GET parameters than + language will be lost (not appended to script-name)." (html ((:p :class "languages") "Content languages: " (loop for (language-symbol language-name) in (website-languages) - do (labels ((show-language-link () - (html (cmslink (format nil "~A?language=~A" (hunchentoot:request-uri*) language-symbol) - (:princ-safe language-name))))) - (if (equal (request-language) language-symbol) - (html "[" (show-language-link) "]") - (html (show-language-link))) - (html " ")))))) + do (labels ((show-language-link () + (html (cmslink (format nil "~A?language=~A" (hunchentoot:script-name*) language-symbol) + (:princ-safe language-name))))) + (if (equal (request-language) language-symbol) + (html "[" (show-language-link) "]") + (html (show-language-link))) + (html " "))))))
(defun decode-ismap-query-string () (let ((coord-string (caar (query-params))))