[bknr-cvs] r2460 - branches/bos/projects/bos/web

hhubner at common-lisp.net hhubner at common-lisp.net
Mon Feb 11 10:46:19 UTC 2008


Author: hhubner
Date: Mon Feb 11 05:46:15 2008
New Revision: 2460

Modified:
   branches/bos/projects/bos/web/webserver.lisp
Log:
Fix for #20, set session's language when / page is sent out.


Modified: branches/bos/projects/bos/web/webserver.lisp
==============================================================================
--- branches/bos/projects/bos/web/webserver.lisp	(original)
+++ branches/bos/projects/bos/web/webserver.lisp	Mon Feb 11 05:46:15 2008
@@ -47,8 +47,11 @@
     ((and (not (scan "/" template-name))
 	  (not (probe-file (merge-pathnames (make-pathname :name template-name :type "xml")
 					    (template-handler-destination handler)))))
-     (setf template-name (format nil "~A/~A" (or (find-browser-prefered-language request)
-						 *default-language*)
+     (unless (session-variable :language)
+       (setf (session-variable :language) (or (find-browser-prefered-language request)
+					      *default-language*)))
+     (setf template-name (format nil "~A/~A"
+				 (session-variable :language)
 				 (if (equal "" template-name)
 				     "index" template-name)))))
   (call-next-method handler template-name))



More information about the Bknr-cvs mailing list