On Wed, 2 Jun 2010, comb wrote: > Output: > string '/search/q' (length=9) > string 'http://localhost:8047/frontend_dev.php/search/q' (length=47) > boolean false > > But I would expect the $is_recursive to be true?! > How can I evaluate if the current route is the same as the referrer > comes from? :-/
Maybe if you told us what you're trying to accomplish, we can suggest possible solutions. What you're trying to do sounds odd to me, there might be a better way though. > On 3 Jun., 00:28, pghoratiu <[email protected]> wrote: > > You need to evaluate your routes into a module/action tuple, see the > > last > > example on this > > page:http://pookey.co.uk/wordpress/archives/80-playing-with-symfony-routin... > > You can probably load the routes separately from the YAML as well. > > > > gabriel > > > > On Jun 3, 12:24 am, comb <[email protected]> wrote: > > > > > yeah but how can I check if the current page is the same as the user > > > comes from? > > > > > On 2 Jun., 21:20, Eno <[email protected]> wrote: > > > > > > On Wed, 2 Jun 2010, comb wrote: > > > > > In a executeIndex(...) I want to redirect to the referrer, but only if > > > > > the referrer is not the current action. > > > > > How can I do that? > > > > > > > //... > > > > > $ref = $request->getReferer(); > > > > > if ($ref != ...what do I need HERE?...) > > > > > { > > > > > $this->redirect(empty($ref)?'@homepage':$ref); > > > > > } > > > > > } > > > > > //... > > > > > > > problem is that the getReferer() method returns not a route but a > > > > > string with the whole http-uri incl. server etc.. > > > > > > That's right - that's what a referrer string > > > > is.http://en.wikipedia.org/wiki/HTTP_referrer > > > > > > -- > > > > > > -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
