Improve goaway legibility
This commit is contained in:
parent
c238154a6e
commit
e74dbb3693
10
boot.php
10
boot.php
|
@ -851,13 +851,15 @@ function killme()
|
||||||
/**
|
/**
|
||||||
* @brief Redirect to another URL and terminate this process.
|
* @brief Redirect to another URL and terminate this process.
|
||||||
*/
|
*/
|
||||||
function goaway($s)
|
function goaway($path)
|
||||||
{
|
{
|
||||||
if (!strstr(normalise_link($s), "http://")) {
|
if (strstr(normalise_link($path), 'http://')) {
|
||||||
$s = System::baseUrl() . "/" . $s;
|
$url = $path;
|
||||||
|
} else {
|
||||||
|
$url = System::baseUrl() . '/' . ltrim($path, '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
header("Location: $s");
|
header("Location: $url");
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user