mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
[FIX] HTTPS errors in Tracy
This commit is contained in:
parent
5291fa345e
commit
8b1bc4b894
2 changed files with 6 additions and 4 deletions
|
@ -40,8 +40,9 @@ class Club extends RowModel
|
|||
|
||||
function getAvatarUrl(): string
|
||||
{
|
||||
$serverUrl = "http" . ($_SERVER["HTTPS"] === "on" ? "s" : "") . "://";
|
||||
$serverUrl .= $_SERVER["HTTP_HOST"];
|
||||
$url = ((!empty($_SERVER['HTTPS'])) ? 'https' : 'http') . '://' . $_SERVER['SERVER_NAME'] . '/';
|
||||
$url = explode('?', $url);
|
||||
$serverUrl = $url[0];
|
||||
$avPhoto = $this->getAvatarPhoto();
|
||||
|
||||
return is_null($avPhoto) ? "$serverUrl/assets/packages/static/openvk/img/camera_200.png" : $avPhoto->getURL();
|
||||
|
|
|
@ -94,8 +94,9 @@ class User extends RowModel
|
|||
|
||||
function getAvatarUrl(): string
|
||||
{
|
||||
$serverUrl = "http" . ($_SERVER["HTTPS"] === "on" ? "s" : "") . "://";
|
||||
$serverUrl .= $_SERVER["HTTP_HOST"];
|
||||
$url = ((!empty($_SERVER['HTTPS'])) ? 'https' : 'http') . '://' . $_SERVER['SERVER_NAME'] . '/';
|
||||
$url = explode('?', $url);
|
||||
$serverUrl = $url[0];
|
||||
|
||||
if($this->getRecord()->deleted)
|
||||
return "$serverUrl/assets/packages/static/openvk/img/camera_200.png";
|
||||
|
|
Loading…
Reference in a new issue