mirror of https://github.com/nextcloud/server
Add dedicated product name to OCP\Defaults
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
51add75e51
commit
4673b54a2c
|
@ -75,6 +75,8 @@ class ThemingDefaults extends \OC_Defaults {
|
|||
/** @var string */
|
||||
private $entity;
|
||||
/** @var string */
|
||||
private $productName;
|
||||
/** @var string */
|
||||
private $url;
|
||||
/** @var string */
|
||||
private $color;
|
||||
|
@ -119,6 +121,7 @@ class ThemingDefaults extends \OC_Defaults {
|
|||
$this->name = parent::getName();
|
||||
$this->title = parent::getTitle();
|
||||
$this->entity = parent::getEntity();
|
||||
$this->productName = parent::getName();
|
||||
$this->url = parent::getBaseUrl();
|
||||
$this->color = parent::getColorPrimary();
|
||||
$this->iTunesAppId = parent::getiTunesAppId();
|
||||
|
@ -142,6 +145,10 @@ class ThemingDefaults extends \OC_Defaults {
|
|||
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() {
|
||||
return $this->config->getAppValue('theming', 'url', $this->url);
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ class Defaults {
|
|||
}
|
||||
|
||||
/**
|
||||
* name of your ownCloud instance
|
||||
* name of your Nextcloud instance (e.g. MyPrivateCloud)
|
||||
* @return string
|
||||
* @since 6.0.0
|
||||
*/
|
||||
|
@ -112,6 +112,16 @@ class Defaults {
|
|||
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
|
||||
* @return string
|
||||
|
|
Loading…
Reference in New Issue