From 91598cbfb57d8493b0f5b63bce972d01a59ce1fd Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Wed, 14 Jun 2017 09:25:53 +0200 Subject: [PATCH] Use theme methods "getTitle" and "getEntity" as fallback if name is not themed. This fixes an issue with custom filesystem themes that can define title, name and entity differently, but the theming app was only using the name as fallback (see #5374). Signed-off-by: Joachim Bauch --- apps/theming/lib/ThemingDefaults.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 5dd22fb632..6ee546d263 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -50,6 +50,10 @@ class ThemingDefaults extends \OC_Defaults { /** @var string */ private $name; /** @var string */ + private $title; + /** @var string */ + private $entity; + /** @var string */ private $url; /** @var string */ private $slogan; @@ -93,6 +97,8 @@ class ThemingDefaults extends \OC_Defaults { $this->appManager = $appManager; $this->name = parent::getName(); + $this->title = parent::getTitle(); + $this->entity = parent::getEntity(); $this->url = parent::getBaseUrl(); $this->slogan = parent::getSlogan(); $this->color = parent::getColorPrimary(); @@ -110,11 +116,11 @@ class ThemingDefaults extends \OC_Defaults { } public function getTitle() { - return $this->getName(); + return strip_tags($this->config->getAppValue('theming', 'name', $this->title)); } public function getEntity() { - return $this->getName(); + return strip_tags($this->config->getAppValue('theming', 'name', $this->entity)); } public function getBaseUrl() {