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