aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2021-06-16 16:49:08 +0200
committerGitHub <noreply@github.com>2021-06-16 16:49:08 +0200
commitff8cfbb24e49540362c9d9683c14daa40d07f495 (patch)
treea108ad08bc654f14ea889ac132755a9afd9299ec
parent39f0aa5abe0867a99218b76995d114ce7b394b84 (diff)
parentf6108acea41b240607eee4c61d6276206d5868a0 (diff)
downloadnextcloud-server-ff8cfbb24e49540362c9d9683c14daa40d07f495.tar.gz
nextcloud-server-ff8cfbb24e49540362c9d9683c14daa40d07f495.zip
Merge pull request #27529 from nextcloud/fix/25950/default-product-name
Fix default product name for old themes
-rw-r--r--apps/theming/lib/ThemingDefaults.php2
-rw-r--r--lib/private/legacy/OC_Defaults.php9
2 files changed, 10 insertions, 1 deletions
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index 9d0ea78d8ea..7e7d9a4fa13 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -121,7 +121,7 @@ class ThemingDefaults extends \OC_Defaults {
$this->name = parent::getName();
$this->title = parent::getTitle();
$this->entity = parent::getEntity();
- $this->productName = parent::getName();
+ $this->productName = parent::getProductName();
$this->url = parent::getBaseUrl();
$this->color = parent::getColorPrimary();
$this->iTunesAppId = parent::getiTunesAppId();
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;
+ }
}