diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-07-29 17:54:30 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-07-29 18:07:04 +0200 |
commit | 8fb89056bd2f99b1df7dc7a3970fc293272c8ab6 (patch) | |
tree | 8f38f85f97de089a7d81bc4571630ba680fee5c6 /lib/private/defaults.php | |
parent | 3ef680d96623eb6350015843f56b55b593a053bd (diff) | |
download | nextcloud-server-8fb89056bd2f99b1df7dc7a3970fc293272c8ab6.tar.gz nextcloud-server-8fb89056bd2f99b1df7dc7a3970fc293272c8ab6.zip |
make knowledge base url configurable
Diffstat (limited to 'lib/private/defaults.php')
-rw-r--r-- | lib/private/defaults.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/private/defaults.php b/lib/private/defaults.php index 16f45943f54..b86805357bd 100644 --- a/lib/private/defaults.php +++ b/lib/private/defaults.php @@ -46,9 +46,11 @@ class OC_Defaults { private $defaultSlogan; private $defaultLogoClaim; private $defaultMailHeaderColor; + private $defaultKnowledgeBaseUrl; function __construct() { $this->l = \OC::$server->getL10N('lib'); + $urlGenerator = \OC::$server->getURLGenerator(); $version = OC_Util::getVersion(); $this->defaultEntity = 'ownCloud'; /* e.g. company name, used for footers and copyright notices */ @@ -64,6 +66,7 @@ class OC_Defaults { $this->defaultSlogan = $this->l->t('web services under your control'); $this->defaultLogoClaim = ''; $this->defaultMailHeaderColor = '#1d2d44'; /* header color of mail notifications */ + $this->defaultKnowledgeBaseUrl = $urlGenerator->linkToRoute('settings_help'); $themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php'; if (file_exists($themePath)) { @@ -79,6 +82,7 @@ class OC_Defaults { /** * @param string $method + * @return bool */ private function themeExist($method) { if (isset($this->theme) && method_exists($this->theme, $method)) { @@ -280,4 +284,19 @@ class OC_Defaults { } } + /** + * get knowledge base URL, will be used for the "Help"-Link in the top + * right menu + * + * @return string + */ + public function getKnowledgeBaseUrl() { + if ($this->themeExist('getKnowledgeBaseUrl')) { + return $this->theme->getKnowledgeBaseUrl(); + } else { + return $this->defaultKnowledgeBaseUrl; + } + + } + } |