is not used any more and exists only for history. Post new tickets on the Github account. n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 15 years ago

Closed 14 years ago

#158 closed enhancement (fixed)

redirect to referrer new response

Reported by: Aubanel Owned by: laurentj
Priority: lowest Milestone: Jelix 1.0 RC1
Component: jelix:core response Version: 1.0 beta1
Severity: trivial Keywords: redirect referrer
Cc: Blocked By:
Blocking: Documentation needed:
Hosting Provider: Php version:


Pretty trivial, here is a redirectReferrer response. Handle with care, this might lead to usability issues when no referrer exists.

Attachments (1)

redirectReferer.class.php (874 bytes) - added by laurentj 15 years ago.
the response class

Download all attachments as: .zip

Change History (5)

comment:1 Changed 15 years ago by laurentj

who are you ? where is the patch ?

comment:2 Changed 15 years ago by laurentj

  • Reporter changed from anonymous to Aubanel

ok, response by email :-)

Changed 15 years ago by laurentj

the response class

comment:3 Changed 14 years ago by laurentj

  • Milestone set to Jelix 1.0

the response should check the content of 'HTTP_REFERER', and if empty it should redirect to a given url. In fact, this response could inherit from jResponseRedirectUrl.

comment:4 Changed 14 years ago by laurentj

  • Resolution set to fixed
  • Status changed from new to closed

This patch won't be included into jelix. I prefered to add a new method in jResponseRedirectUrl : toReferer(). You can give to it a default url if the referer url doesn't exist. The method returns true if the referer url is ok.

  $rep = $this->getResponse('redirecturl');
     $rep->url ='/an/other/url';


  return $rep;
Note: See TracTickets for help on using tickets.