aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2021-06-16 15:52:49 +0200
committerMorris Jobke <hey@morrisjobke.de>2021-06-16 15:52:49 +0200
commitf6108acea41b240607eee4c61d6276206d5868a0 (patch)
tree72b894cc23d2aa53a43707adc6e1f25069566ae7 /lib/private/legacy
parent818fc95b0399b07bb41c02494292a77700b9b35a (diff)
downloadnextcloud-server-f6108acea41b240607eee4c61d6276206d5868a0.tar.gz
nextcloud-server-f6108acea41b240607eee4c61d6276206d5868a0.zip
Fix default product name for old themes
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/OC_Defaults.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/legacy/OC_Defaults.php b/lib/private/legacy/OC_Defaults.php
index f3c1763b9ad..fa90dff2edf 100644
--- a/lib/private/legacy/OC_Defaults.php
+++ b/lib/private/legacy/OC_Defaults.php
@@ -53,6 +53,7 @@ class OC_Defaults {
private $defaultSlogan;
private $defaultColorPrimary;
private $defaultTextColorPrimary;
+ private $defaultProductName;
public function __construct() {
$config = \OC::$server->getConfig();
@@ -69,6 +70,7 @@ class OC_Defaults {
$this->defaultDocVersion = \OC_Util::getVersion()[0]; // used to generate doc links
$this->defaultColorPrimary = '#0082c9';
$this->defaultTextColorPrimary = '#ffffff';
+ $this->defaultProductName = 'Nextcloud';
$themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php';
if (file_exists($themePath)) {
@@ -331,4 +333,11 @@ class OC_Defaults {
}
return $this->defaultTextColorPrimary;
}
+
+ public function getProductName() {
+ if ($this->themeExist('getProductName')) {
+ return $this->theme->getProductName();
+ }
+ return $this->defaultProductName;
+ }
}