mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Ticket #49: Factfinder: "Finish" doesn't redirect to "thank you"
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@46044 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f9dc7a81d7
commit
2ccd4c06ee
@ -422,6 +422,10 @@ class Controller extends ViewableData {
|
||||
* Handle redirection
|
||||
*/
|
||||
function redirect($url) {
|
||||
if($this->response->getHeader('Location')) {
|
||||
user_error("Already directed to " . $this->response->getHeader('Location') . "; now trying to direct to $url", E_USER_ERROR);
|
||||
}
|
||||
|
||||
// Attach site-root to relative links, if they have a slash in them
|
||||
if($url == "" || $url[0] == '?' || (substr($url,0,4) != "http" && $url[0] != "/" && strpos($url,'/') !== false)){
|
||||
$url = Director::baseURL() . $url;
|
||||
|
@ -240,7 +240,7 @@ class Director {
|
||||
* @return string If redirect() has been called, it will return the URL redirected to. Otherwise, it will return null;
|
||||
*/
|
||||
static function redirected_to() {
|
||||
Controller::curr()->redirectedTo();
|
||||
return Controller::curr()->redirectedTo();
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user