[Cartoweb-users] Need to reset the session by PHP code
JOALLAND jérémie
j.joalland at memoris.fr
Mon Apr 26 09:32:12 EST 2010
I have tried the simplest way, and it seems to work fine.
I will perform more test to validate this solution.
Thank you.
De : Oliver Christen [mailto:oliver.christen at camptocamp.com]
Envoyé : lundi 26 avril 2010 14:43
À : JOALLAND jérémie; cartoweb-users at lists.maptools.org
Objet : Re: [Cartoweb-users] Need to reset the session by PHP code
Hi Jérémie
the simplest way is to add "?reset_session" (or "&reset_session" if you
already have other parameters) in the url which allow the user to access the
application.
otherwise, the reset_session parameter being used very very early in the
whole workflow, you can not set it using the existing filtering mecanismes
(im talking about the filterGetRequest/filterPostRequest) but what you could
do is add some code in the client.php file, which is the default entry point
for the application, or, if you used a redirector entry point (see "Project
Shortcut" in http://www.cartoweb.org/cwiki/HowToCreateANewProject) you can
add that code there instead.
$_REQUEST can be very easily manipulated, all you have to do is something
like this:
$_REQUEST['reset_session'] = 1;
(the assignated value has no real importance, it is not evaluated)
enclosed in some condition so you can set it or not depending of what you
need, for example by checking the referer or something like that
regards
Oliver
----- Original Message -----
From: JOALLAND jérémie <mailto:j.joalland at memoris.fr>
To: cartoweb-users at lists.maptools.org
Sent: Monday, April 26, 2010 2:13 PM
Subject: [Cartoweb-users] Need to reset the session by PHP code
I am using CartoWeb 3.5 in a CMS (Joomla), as I have several different
cartographic menus.
My problem is that my Cartoweb page is keeping the session information all
the time.
When the user is accessing one cartographic project for the first time, he
can for example zoom in and change the layer visibility settings.
Then hes accessing other parts of the web site.
Problem : when he comes back to the same cartographic project for the second
time, the cartoweb project page is not opened with default setting (initial
extent, initial layers setting), but as it was after the first access :
extent from zoom in and last layer visibility settings.
Question : how can I reset the cartoweb session when opening my cartographic
project page ?
I am currently using this code to call the project (from php page in
/htdocs/) :
<?php
$_ENV['CW3_PROJECT'] = 'recherche_auvergne';
require_once('client.php');
?>
Thanks for you help.
_____
_______________________________________________
Cartoweb-users mailing list
Cartoweb-users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20100426/cdecead2/attachment.htm
More information about the Cartoweb-users
mailing list