Revert "make knowledge base url configurable"
This reverts commit 8fb89056bd
.
This commit is contained in:
parent
c16fd29f29
commit
32ccd66214
|
@ -421,7 +421,6 @@ class OC_App {
|
||||||
*/
|
*/
|
||||||
public static function getSettingsNavigation() {
|
public static function getSettingsNavigation() {
|
||||||
$l = \OC::$server->getL10N('lib');
|
$l = \OC::$server->getL10N('lib');
|
||||||
$defaults = new OC_Defaults();
|
|
||||||
|
|
||||||
$settings = array();
|
$settings = array();
|
||||||
// by default, settings only contain the help menu
|
// by default, settings only contain the help menu
|
||||||
|
@ -432,7 +431,7 @@ class OC_App {
|
||||||
array(
|
array(
|
||||||
"id" => "help",
|
"id" => "help",
|
||||||
"order" => 1000,
|
"order" => 1000,
|
||||||
"href" => $defaults->getKnowledgeBaseUrl(),
|
"href" => OC_Helper::linkToRoute("settings_help"),
|
||||||
"name" => $l->t("Help"),
|
"name" => $l->t("Help"),
|
||||||
"icon" => OC_Helper::imagePath("settings", "help.svg")
|
"icon" => OC_Helper::imagePath("settings", "help.svg")
|
||||||
)
|
)
|
||||||
|
|
|
@ -46,11 +46,9 @@ class OC_Defaults {
|
||||||
private $defaultSlogan;
|
private $defaultSlogan;
|
||||||
private $defaultLogoClaim;
|
private $defaultLogoClaim;
|
||||||
private $defaultMailHeaderColor;
|
private $defaultMailHeaderColor;
|
||||||
private $defaultKnowledgeBaseUrl;
|
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
$this->l = \OC::$server->getL10N('lib');
|
$this->l = \OC::$server->getL10N('lib');
|
||||||
$urlGenerator = \OC::$server->getURLGenerator();
|
|
||||||
$version = OC_Util::getVersion();
|
$version = OC_Util::getVersion();
|
||||||
|
|
||||||
$this->defaultEntity = 'ownCloud'; /* e.g. company name, used for footers and copyright notices */
|
$this->defaultEntity = 'ownCloud'; /* e.g. company name, used for footers and copyright notices */
|
||||||
|
@ -66,7 +64,6 @@ class OC_Defaults {
|
||||||
$this->defaultSlogan = $this->l->t('web services under your control');
|
$this->defaultSlogan = $this->l->t('web services under your control');
|
||||||
$this->defaultLogoClaim = '';
|
$this->defaultLogoClaim = '';
|
||||||
$this->defaultMailHeaderColor = '#1d2d44'; /* header color of mail notifications */
|
$this->defaultMailHeaderColor = '#1d2d44'; /* header color of mail notifications */
|
||||||
$this->defaultKnowledgeBaseUrl = $urlGenerator->linkToRoute('settings_help');
|
|
||||||
|
|
||||||
$themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php';
|
$themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php';
|
||||||
if (file_exists($themePath)) {
|
if (file_exists($themePath)) {
|
||||||
|
@ -82,7 +79,6 @@ class OC_Defaults {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $method
|
* @param string $method
|
||||||
* @return bool
|
|
||||||
*/
|
*/
|
||||||
private function themeExist($method) {
|
private function themeExist($method) {
|
||||||
if (isset($this->theme) && method_exists($this->theme, $method)) {
|
if (isset($this->theme) && method_exists($this->theme, $method)) {
|
||||||
|
@ -284,19 +280,4 @@ 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,6 @@ class OC_Theme {
|
||||||
private $themeSyncClientUrl;
|
private $themeSyncClientUrl;
|
||||||
private $themeSlogan;
|
private $themeSlogan;
|
||||||
private $themeMailHeaderColor;
|
private $themeMailHeaderColor;
|
||||||
private $themeKnowledgeBaseUrl;
|
|
||||||
|
|
||||||
/* put your custom text in these variables */
|
/* put your custom text in these variables */
|
||||||
function __construct() {
|
function __construct() {
|
||||||
|
@ -40,7 +39,6 @@ class OC_Theme {
|
||||||
$this->themeSyncClientUrl = 'https://owncloud.org/install';
|
$this->themeSyncClientUrl = 'https://owncloud.org/install';
|
||||||
$this->themeSlogan = 'Your custom cloud, personalized for you!';
|
$this->themeSlogan = 'Your custom cloud, personalized for you!';
|
||||||
$this->themeMailHeaderColor = '#745bca';
|
$this->themeMailHeaderColor = '#745bca';
|
||||||
$this->themeKnowledgeBaseUrl = 'https://doc.owncloud.org';
|
|
||||||
}
|
}
|
||||||
/* nothing after this needs to be adjusted */
|
/* nothing after this needs to be adjusted */
|
||||||
|
|
||||||
|
@ -94,8 +92,4 @@ class OC_Theme {
|
||||||
return $this->themeMailHeaderColor;
|
return $this->themeMailHeaderColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getKnowledgeBaseUrl() {
|
|
||||||
return $this->themeKnowledgeBaseUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue