chore(web): HTML::url protocol

This commit is contained in:
Baoshuo Ren 2022-12-04 16:53:02 +08:00
parent 61a35c457a
commit 678582fc47
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -210,9 +210,9 @@ class HTML {
} }
$protocol = HTML::protocol($cfg['location']); $protocol = HTML::protocol($cfg['location']);
$url = '//'.UOJConfig::$data['web'][$cfg['location']]['host']; $url = $protocol . '://' . UOJConfig::$data['web'][$cfg['location']]['host'];
if (HTML::port($cfg['location']) != HTML::standard_port($protocol)) { if (HTML::port($cfg['location']) != HTML::standard_port($protocol)) {
$url .= ':'.HTML::port($cfg['location']); $url .= ':' . HTML::port($cfg['location']);
} }
if ($param) { if ($param) {
$url .= $path . '?' . HTML::query_string_encode($param); $url .= $path . '?' . HTML::query_string_encode($param);