chore(legacy): remove exploded public_url config

Replace exploded public_url parts with validated url object.
This commit is contained in:
jo 2022-07-07 23:45:15 +02:00 committed by Kyle Robbertze
parent d323657047
commit 712ecd70b4
3 changed files with 36 additions and 25 deletions

View file

@ -510,13 +510,11 @@ SQL;
*/
public function getFileUrl()
{
$CC_CONFIG = Config::getConfig();
$protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';
$serverName = $_SERVER['SERVER_NAME'];
$serverPort = $_SERVER['SERVER_PORT'];
$subDir = $CC_CONFIG['baseDir'];
$subDir = Config::getBasePath();
if ($protocol === 'https' && $serverPort == 80) {
$serverPort = 443;