summaryrefslogtreecommitdiffstats
path: root/apps/theming/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/theming/lib')
-rw-r--r--apps/theming/lib/ThemingDefaults.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index 9509fc11077..0824a36ccdc 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -129,9 +129,10 @@ class ThemingDefaults extends \OC_Defaults {
/**
* Themed logo url
*
+ * @param bool $useSvg Whether to point to the SVG image or a fallback
* @return string
*/
- public function getLogo() {
+ public function getLogo($useSvg = true) {
$logo = $this->config->getAppValue('theming', 'logoMime', false);
$logoExists = true;
@@ -144,7 +145,12 @@ class ThemingDefaults extends \OC_Defaults {
$cacheBusterCounter = $this->config->getAppValue('theming', 'cachebuster', '0');
if(!$logo || !$logoExists) {
- return $this->urlGenerator->imagePath('core','logo.svg') . '?v=' . $cacheBusterCounter;
+ if($useSvg) {
+ $logo = $this->urlGenerator->imagePath('core', 'logo.svg');
+ } else {
+ $logo = $this->urlGenerator->imagePath('core', 'logo.png');
+ }
+ return $logo . '?v=' . $cacheBusterCounter;
}
return $this->urlGenerator->linkToRoute('theming.Theming.getLogo') . '?v=' . $cacheBusterCounter;