diff --git a/lib/be_branding.php b/lib/be_branding.php index b94ddb1..f66bb39 100644 --- a/lib/be_branding.php +++ b/lib/be_branding.php @@ -75,35 +75,22 @@ public static function makeFavIcon($hexColor, $path) } } - public static function getCurrentDomainWithProtocol() - { - $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://"; - $domainName = $_SERVER['HTTP_HOST']; - return $protocol . $domainName; - } - public static function checkExtension($filename) { $img_file_parts = pathinfo($filename); //print_r($img_file_parts); - $be_logo = '/media/' . $filename; + $be_logo = 'media/' . $filename; $ext = $img_file_parts['extension']; //echo $ext; if ($ext == "jpg" || $ext == "jpeg" || $ext == "png") { - $be_logo = '/index.php?rex_media_type=rex_media_medium&rex_media_file=' . $filename; + $be_logo = 'index.php?rex_media_type=rex_media_medium&rex_media_file=' . $filename; } if ($ext === "svg") { - $be_logo = '/media/' . $filename; - } - $currentDomainId = self::getCurrentBeDomainId(false); - $frontEndUrl = self::getDomainByID( $currentDomainId ); - if($frontEndUrl) { - $frontEndUrl = $frontEndUrl['domain']; - } else { - $frontEndUrl = self::getCurrentDomainWithProtocol(); + $be_logo = 'media/' . $filename; } - return $frontEndUrl . $be_logo; + return rex_url::frontend($be_logo); +# return $frontEndUrl . $be_logo; }// EoF /** diff --git a/package.yml b/package.yml index 423fc54..49119ad 100644 --- a/package.yml +++ b/package.yml @@ -1,5 +1,5 @@ package: be_branding -version: '1.8.0-beta2' +version: '1.8.0-beta3' author: Medienfeuer, Daniel Springer supportpage: https://github.com/medienfeuer/be_branding