From 6e9254e008467d4b1d7e5aaba1350f820b904403 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sat, 19 Nov 2022 11:58:04 +0800 Subject: [PATCH] revert: 387fdf968b7a629f319b552656bd91a4439e771a --- web/app/models/HTML.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/app/models/HTML.php b/web/app/models/HTML.php index 35d3922..06ec512 100644 --- a/web/app/models/HTML.php +++ b/web/app/models/HTML.php @@ -209,11 +209,11 @@ class HTML { $param['_token'] = crsf_token(); } - // $url = '//'.UOJConfig::$data['web'][$config['location']]['host']; - // if (HTML::port($cfg['location']) != HTML::standard_port($protocol)) { - // $url .= ':'.HTML::port($cfg['location']); - // } - $url = ''; + $protocol = HTML::protocol($cfg['location']); + $url = '//'.UOJConfig::$data['web'][$cfg['location']]['host']; + if (HTML::port($cfg['location']) != HTML::standard_port($protocol)) { + $url .= ':'.HTML::port($cfg['location']); + } if ($param) { $url .= $path . '?' . HTML::query_string_encode($param); } elseif ($path != '/') {