You should store in the session the timestamp of the last request so you can decide when to do the redirect for the user.
gabriel On Jun 3, 12:44 pm, comb <sa...@gmx.net> wrote: > Thanks, I solved it with the users session: > > // redirect to referrer if not in this action here > if ($this->getUser()->getAttribute('in_search', false)) > { > $this->getUser()->setAttribute('in_search', false); > $this->redirect('@homepage');} > > else > { > $ref = $request->getReferer(); > if (empty($ref)) > { > $this->redirect('@homepage'); > } > else > { > $this->getUser()->setAttribute('in_search', true); > $this->redirect($ref); > } > > } > > On 3 Jun., 05:57, Eno <symb...@gmail.com> wrote: > > > > > On Wed, 2 Jun 2010, comb wrote: > > > But now there is a search-results page, too, that comes from the > > > search-action, where the redirection is done. If the user starts a new > > > search from here and is too fast he gets the flash-message again, but > > > the redirect to the last page is recursively since he came from the > > > same action as he's redirected to. In this case I want to redirect the > > > user to @homepage, too. But I don't know, how to find out, if the > > > referrer matches the current route. > > > What Ive done in the past is generate the URL for the current page and > > store it in the session, so you can examine it in your action and take > > appropriate action. Referer is really not reliable so I donbt use it. > > > -- -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en