Skip to content
Snippets Groups Projects
Unverified Commit 4673b54a authored by Julius Härtl's avatar Julius Härtl
Browse files

Add dedicated product name to OCP\Defaults


Signed-off-by: default avatarJulius Härtl <jus@bitgrid.net>
parent 51add75e
No related branches found
No related tags found
No related merge requests found
...@@ -75,6 +75,8 @@ class ThemingDefaults extends \OC_Defaults { ...@@ -75,6 +75,8 @@ class ThemingDefaults extends \OC_Defaults {
/** @var string */ /** @var string */
private $entity; private $entity;
/** @var string */ /** @var string */
private $productName;
/** @var string */
private $url; private $url;
/** @var string */ /** @var string */
private $color; private $color;
...@@ -119,6 +121,7 @@ class ThemingDefaults extends \OC_Defaults { ...@@ -119,6 +121,7 @@ class ThemingDefaults extends \OC_Defaults {
$this->name = parent::getName(); $this->name = parent::getName();
$this->title = parent::getTitle(); $this->title = parent::getTitle();
$this->entity = parent::getEntity(); $this->entity = parent::getEntity();
$this->productName = parent::getName();
$this->url = parent::getBaseUrl(); $this->url = parent::getBaseUrl();
$this->color = parent::getColorPrimary(); $this->color = parent::getColorPrimary();
$this->iTunesAppId = parent::getiTunesAppId(); $this->iTunesAppId = parent::getiTunesAppId();
...@@ -142,6 +145,10 @@ class ThemingDefaults extends \OC_Defaults { ...@@ -142,6 +145,10 @@ class ThemingDefaults extends \OC_Defaults {
return strip_tags($this->config->getAppValue('theming', 'name', $this->entity)); return strip_tags($this->config->getAppValue('theming', 'name', $this->entity));
} }
public function getProductName() {
return strip_tags($this->config->getAppValue('theming', 'productName', $this->productName));
}
public function getBaseUrl() { public function getBaseUrl() {
return $this->config->getAppValue('theming', 'url', $this->url); return $this->config->getAppValue('theming', 'url', $this->url);
} }
......
...@@ -104,7 +104,7 @@ class Defaults { ...@@ -104,7 +104,7 @@ class Defaults {
} }
/** /**
* name of your ownCloud instance * name of your Nextcloud instance (e.g. MyPrivateCloud)
* @return string * @return string
* @since 6.0.0 * @since 6.0.0
*/ */
...@@ -112,6 +112,16 @@ class Defaults { ...@@ -112,6 +112,16 @@ class Defaults {
return $this->defaults->getName(); return $this->defaults->getName();
} }
/**
* Name of the software product (defaults to Nextcloud)
*
* @return string
* @since 22.0.0
*/
public function getProductName(): string {
return $this->defaults->getProductName();
}
/** /**
* name of your ownCloud instance containing HTML styles * name of your ownCloud instance containing HTML styles
* @return string * @return string
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment