Skip to content

Commit

Permalink
1.8.0-beta3
Browse files Browse the repository at this point in the history
* Logopfad für Login-Screen bei Installation in Unterordner angepasst
#31
  • Loading branch information
danspringer committed Oct 13, 2022
1 parent 9f1e36b commit 5c5f5ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
23 changes: 5 additions & 18 deletions lib/be_branding.php
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down
2 changes: 1 addition & 1 deletion package.yml
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 5c5f5ed

Please sign in to comment.