diff --git a/Web/Models/Entities/Application.php b/Web/Models/Entities/Application.php index da090efea..7053dc41d 100644 --- a/Web/Models/Entities/Application.php +++ b/Web/Models/Entities/Application.php @@ -84,7 +84,7 @@ public function getAvatarUrl(): string case "server": $settings = (object) OPENVK_ROOT_CONF["openvk"]["preferences"]["uploads"]["server"]; return ( - $settings->protocol ?? ovk_scheme() . + ($settings->protocol ?? ovk_scheme()) . "://" . $settings->host . $settings->path . substr($hash, 0, 2) . "/$hash" . "_app_avatar.png" diff --git a/Web/Models/Entities/Document.php b/Web/Models/Entities/Document.php index 6f12a90e4..710efa9b9 100644 --- a/Web/Models/Entities/Document.php +++ b/Web/Models/Entities/Document.php @@ -57,7 +57,7 @@ public function getURL(): string case "server": $settings = (object) OPENVK_ROOT_CONF["openvk"]["preferences"]["uploads"]["server"]; return ( - $settings->protocol ?? ovk_scheme() . + ($settings->protocol ?? ovk_scheme()) . "://" . $settings->host . $settings->path . substr($hash, 0, 2) . "/$hash.$filetype" diff --git a/Web/Models/Entities/Media.php b/Web/Models/Entities/Media.php index afea405ed..c688bb001 100644 --- a/Web/Models/Entities/Media.php +++ b/Web/Models/Entities/Media.php @@ -75,7 +75,7 @@ public function getURL(): string case "server": $settings = (object) OPENVK_ROOT_CONF["openvk"]["preferences"]["uploads"]["server"]; return ( - $settings->protocol ?? ovk_scheme() . + ($settings->protocol ?? ovk_scheme()) . "://" . $settings->host . $settings->path . substr($hash, 0, 2) . "/$hash.$this->fileExtension"