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>
This commit is contained in:
parent
5ce3c7003b
commit
91598cbfb5
|
@ -50,6 +50,10 @@ class ThemingDefaults extends \OC_Defaults {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $name;
|
private $name;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
|
private $title;
|
||||||
|
/** @var string */
|
||||||
|
private $entity;
|
||||||
|
/** @var string */
|
||||||
private $url;
|
private $url;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $slogan;
|
private $slogan;
|
||||||
|
@ -93,6 +97,8 @@ class ThemingDefaults extends \OC_Defaults {
|
||||||
$this->appManager = $appManager;
|
$this->appManager = $appManager;
|
||||||
|
|
||||||
$this->name = parent::getName();
|
$this->name = parent::getName();
|
||||||
|
$this->title = parent::getTitle();
|
||||||
|
$this->entity = parent::getEntity();
|
||||||
$this->url = parent::getBaseUrl();
|
$this->url = parent::getBaseUrl();
|
||||||
$this->slogan = parent::getSlogan();
|
$this->slogan = parent::getSlogan();
|
||||||
$this->color = parent::getColorPrimary();
|
$this->color = parent::getColorPrimary();
|
||||||
|
@ -110,11 +116,11 @@ class ThemingDefaults extends \OC_Defaults {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle() {
|
public function getTitle() {
|
||||||
return $this->getName();
|
return strip_tags($this->config->getAppValue('theming', 'name', $this->title));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getEntity() {
|
public function getEntity() {
|
||||||
return $this->getName();
|
return strip_tags($this->config->getAppValue('theming', 'name', $this->entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBaseUrl() {
|
public function getBaseUrl() {
|
||||||
|
|
Loading…
Reference in New Issue