dedupe some referer handling

This commit is contained in:
Shish
2020-03-27 19:41:34 +00:00
parent 5ea7cc5b36
commit c16e3fd939
7 changed files with 15 additions and 17 deletions

View File

@@ -116,3 +116,8 @@ function make_http(string $link): string
return $link;
}
function referer_or(string $dest): string
{
return $_SERVER['HTTP_REFERER'] ?? $dest;
}