mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:40:16 +00:00
Improve goaway legibility
This commit is contained in:
parent
c238154a6e
commit
e74dbb3693
1 changed files with 6 additions and 4 deletions
10
boot.php
10
boot.php
|
@ -851,13 +851,15 @@ function killme()
|
|||
/**
|
||||
* @brief Redirect to another URL and terminate this process.
|
||||
*/
|
||||
function goaway($s)
|
||||
function goaway($path)
|
||||
{
|
||||
if (!strstr(normalise_link($s), "http://")) {
|
||||
$s = System::baseUrl() . "/" . $s;
|
||||
if (strstr(normalise_link($path), 'http://')) {
|
||||
$url = $path;
|
||||
} else {
|
||||
$url = System::baseUrl() . '/' . ltrim($path, '/');
|
||||
}
|
||||
|
||||
header("Location: $s");
|
||||
header("Location: $url");
|
||||
killme();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue