Skip to content
Snippets Groups Projects
Commit 7f82044d authored by Björn Jacob's avatar Björn Jacob Committed by Christian Kuhn
Browse files

[FOLLOWUP][FEATURE] Allow Backend Logo to be set via extConf

The new PHP 7 syntax introduced also returns an empty
string, if set but empty.

Resolves: #74109
Releases: master
Change-Id: If902ea201cb49578ab2109b40de90c37dcb63b5d
Reviewed-on: https://review.typo3.org/47042


Reviewed-by: default avatarBjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: default avatarBjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 70acf102
Branches
Tags
No related merge requests found
...@@ -264,8 +264,17 @@ class BackendController ...@@ -264,8 +264,17 @@ class BackendController
// Extension Configuration to find the TYPO3 logo in the left corner // Extension Configuration to find the TYPO3 logo in the left corner
$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['backend']); $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['backend']);
$logoPath = $extConf['backendLogo'] ?? 'EXT:backend/Resources/Public/Images/typo3-topbar@2x.png'; $logoPath = '';
$logoPath = GeneralUtility::getFileAbsFileName($logoPath); if (!empty($extConf['backendLogo'])) {
$customBackendLogo = GeneralUtility::getFileAbsFileName($extConf['backendLogo']);
if (!empty($customBackendLogo)) {
$logoPath = $customBackendLogo;
}
}
// if no custom logo was set or the path is invalid, use the original one
if (empty($logoPath)) {
$logoPath = GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Public/Images/typo3-topbar@2x.png');
}
list($logoWidth, $logoHeight) = @getimagesize($logoPath); list($logoWidth, $logoHeight) = @getimagesize($logoPath);
// High-resolution? // High-resolution?
......
...@@ -29,7 +29,7 @@ Have a nice day.</source> ...@@ -29,7 +29,7 @@ Have a nice day.</source>
<source>Background Image: If set, this image will be used as background image for the login screen for screen sizes greater than 767 pixel (e.g. fileadmin/images/my-background.jpg or EXT:my_theme/Resources/Public/Images/my-background.jpg or //domain.tld/my-background.png)</source> <source>Background Image: If set, this image will be used as background image for the login screen for screen sizes greater than 767 pixel (e.g. fileadmin/images/my-background.jpg or EXT:my_theme/Resources/Public/Images/my-background.jpg or //domain.tld/my-background.png)</source>
</trans-unit> </trans-unit>
<trans-unit id="config.backendLogo"> <trans-unit id="config.backendLogo">
<source>Logo: If set, this logo will be used instead of the TYPO3 logo in the TYPO3 Backend in the left top corner (e.g. fileadmin/images/backend-logo.png or EXT:my_theme/Resources/Public/Images/backend-logo.png or //domain.tld/login-logo.png)</source> <source>Logo: If set, this logo will be used instead of the TYPO3 logo in the TYPO3 Backend in the left top corner (e.g. fileadmin/images/backend-logo.png or EXT:my_theme/Resources/Public/Images/backend-logo.png</source>
</trans-unit> </trans-unit>
<trans-unit id="foldertreeview.noFolders.title"> <trans-unit id="foldertreeview.noFolders.title">
<source>No folders available</source> <source>No folders available</source>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment