diff options
author | Joachim Bauch <bauch@struktur.de> | 2017-06-14 09:25:53 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-09-13 11:02:45 +0200 |
commit | 91598cbfb57d8493b0f5b63bce972d01a59ce1fd (patch) | |
tree | a5128e4680509df458e6505ecc58997136f84907 /apps/theming/lib | |
parent | 5ce3c7003ba754003d79624aac26e6dbc19936d7 (diff) | |
download | nextcloud-server-91598cbfb57d8493b0f5b63bce972d01a59ce1fd.tar.gz nextcloud-server-91598cbfb57d8493b0f5b63bce972d01a59ce1fd.zip |
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 <bauch@struktur.de>
Diffstat (limited to 'apps/theming/lib')
-rw-r--r-- | apps/theming/lib/ThemingDefaults.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 5dd22fb6326..6ee546d2630 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() { |