/** * return a web alias starting from a provied string * * @param $string the provided string to be parsed * @return the translated string */ function _webAlias($string){ $ret = trim(strtolower($string)); $ret = preg_replace("/[ ]/","-",$ret); $ret = preg_replace("/^[-]+/","",$ret); $ret = preg_replace("/[-]+\$/","",$ret); $ret = preg_replace("/[^a-z0-9-]/","",$ret); return $ret; } ...
}
?> -- Live life like you're gonna die. Because you're gonna. William Shatner
On Wed, Apr 23, 2008 at 11:37 AM, Davide <d...@linux.it> wrote:
> A strange thing regarding this topic.
> I can't understand where's the problem.
> Everytime I call the method with the observeField, all my Session data > is lost and so I'm disconnected.
You might have to change some stuff in your config/core.php file.
Look for Session.checkAgent
Often you have do
Configure::write('Session.checkAgent', false);
to preserve sessions when using Ajax
Hope that helps.
-- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephants to handling snakes..." @TheKeyBoard: http://www.littlehart.net/atthekeyboard
On Wed, Apr 23, 2008 at 11:52 AM, Davide <d...@linux.it> wrote: > Some other ideas? Cake version 1.1.18.
D'oh -- that stuff I posted is Cake 1.2 specific.
I don't use Cake 1.1 at all, so can't help you there.
-- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephants to handling snakes..." @TheKeyBoard: http://www.littlehart.net/atthekeyboard
Chris Hartjes wrote: > D'oh -- that stuff I posted is Cake 1.2 specific.
> I don't use Cake 1.1 at all, so can't help you there.
Ok Chris but you gave me a hint. So searching in the core code (session.php) I saw three points where Session.checkAgent is present. The only way I found (puttin some debug messages) for setting this parameter was putting the Configure::write inside the bootstrap.php, cause inside the core.php it seems to be ignored, or maybe the core.php is read after the session.php; I've not got deeper the question.
I've also tried to put it to false editing the core libs/configure.php the only Session.checkAgent (line 340) but it seems to be ignored or to be not enough for the problem.
Finally, I've solved, after restoring the old situation, making the CAKE_SECURITY=medium in the app core.php (it was "high" before). Now everything is working out right.
Thanks a lot Bye Davide
-- Live life like you're gonna die. Because you're gonna. William Shatner