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 != '/') {