From: Hypolite Petovan Date: Sun, 17 Dec 2017 16:43:30 +0000 (-0500) Subject: Improve goaway legibility X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e74dbb36934f24e4ed7f2b38a386919060a180bd;p=friendica.git Improve goaway legibility --- diff --git a/boot.php b/boot.php index d786295587..be97cab757 100644 --- a/boot.php +++ b/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(); }