Browse Source
Merge pull request #27529 from nextcloud/fix/25950/default-product-name
Fix default product name for old themes
pull/27537/head
Morris Jobke
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
10 additions and
1 deletions
-
apps/theming/lib/ThemingDefaults.php
-
lib/private/legacy/OC_Defaults.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(); |
|
|
|
|
|
|
|
@ -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; |
|
|
|
} |
|
|
|
} |