Revert changes to getLogo method prior to moving the code to separate getEmailLogo method
This commit is contained in:
parent
f6edb0351d
commit
5d98dacc8d
|
@ -223,10 +223,8 @@ class ThemingDefaults extends \OC_Defaults {
|
|||
* @param bool $useSvg Whether to point to the SVG image or a fallback
|
||||
* @return string
|
||||
*/
|
||||
public function getLogo($useSvg = true, $emailLogo = false): string {
|
||||
$logoKey = $emailLogo ? 'emailLogo' : 'logo';
|
||||
$logo = $this->config->getAppValue('theming', $logoKey . 'Mime', '');
|
||||
$cacheBusterCounter = $this->config->getAppValue('theming', 'cachebuster', '0');
|
||||
public function getLogo($useSvg = true): string {
|
||||
$logo = $this->config->getAppValue('theming', 'logoMime', '');
|
||||
|
||||
// short cut to avoid setting up the filesystem just to check if the logo is there
|
||||
//
|
||||
|
@ -237,24 +235,15 @@ class ThemingDefaults extends \OC_Defaults {
|
|||
$logoExists = true;
|
||||
} else {
|
||||
try {
|
||||
$this->imageManager->getImage($logoKey, $useSvg);
|
||||
$this->imageManager->getImage('logo', $useSvg);
|
||||
$logoExists = true;
|
||||
} catch (\Exception $e) {
|
||||
$logoExists = false;
|
||||
}
|
||||
|
||||
if (!$logoExists) {
|
||||
try {
|
||||
$logoKey = 'logo';
|
||||
$logo = $this->config->getAppValue('theming', $logoKey . 'Mime', '');
|
||||
$this->imageManager->getImage($logoKey, $useSvg);
|
||||
$logoExists = true;
|
||||
} catch (\Exception $e) {
|
||||
$logoExists = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$cacheBusterCounter = $this->config->getAppValue('theming', 'cachebuster', '0');
|
||||
|
||||
if (!$logo || !$logoExists) {
|
||||
if ($useSvg) {
|
||||
$logo = $this->urlGenerator->imagePath('core', 'logo/logo.svg');
|
||||
|
@ -264,7 +253,7 @@ class ThemingDefaults extends \OC_Defaults {
|
|||
return $logo . '?v=' . $cacheBusterCounter;
|
||||
}
|
||||
|
||||
return $this->urlGenerator->linkToRoute('theming.Theming.getImage', [ 'key' => $logoKey, 'useSvg' => $useSvg, 'v' => $cacheBusterCounter ]);
|
||||
return $this->urlGenerator->linkToRoute('theming.Theming.getImage', [ 'key' => 'logo', 'useSvg' => $useSvg, 'v' => $cacheBusterCounter ]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue