mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG Fix developer output in redirection script
This commit is contained in:
parent
60f4720415
commit
70e0d60f93
@ -238,13 +238,17 @@ class SS_HTTPResponse {
|
|||||||
$url = Director::absoluteURL($this->headers['Location'], true);
|
$url = Director::absoluteURL($this->headers['Location'], true);
|
||||||
$urlATT = Convert::raw2htmlatt($url);
|
$urlATT = Convert::raw2htmlatt($url);
|
||||||
$urlJS = Convert::raw2js($url);
|
$urlJS = Convert::raw2js($url);
|
||||||
echo
|
$title = Director::isDev()
|
||||||
"<p>Redirecting to <a href=\"$urlATT\" title=\"Click this link if your browser does not redirect you\">"
|
? "{$urlATT}... (output started on {$file}, line {$line})"
|
||||||
. "$urlATT... (output started on $file, line $line)</a></p>
|
: "{$urlATT}...";
|
||||||
<meta http-equiv=\"refresh\" content=\"1; url=$urlATT\" />
|
echo <<<EOT
|
||||||
<script type=\"text/javascript\">setTimeout(function(){
|
<p>Redirecting to <a href="{$urlATT}" title="Click this link if your browser does not redirect you">{$title}</a></p>
|
||||||
window.location.href = \"$urlJS\";
|
<meta http-equiv="refresh" content="1; url={$urlATT}" />
|
||||||
}, 50);</script>";
|
<script type="text/javascript">setTimeout(function(){
|
||||||
|
window.location.href = "{$urlJS}";
|
||||||
|
}, 50);</script>";
|
||||||
|
EOT
|
||||||
|
;
|
||||||
} else {
|
} else {
|
||||||
$line = $file = null;
|
$line = $file = null;
|
||||||
if(!headers_sent($file, $line)) {
|
if(!headers_sent($file, $line)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user