diff options
Diffstat (limited to 'lib/private/legacy/OC_Defaults.php')
-rw-r--r-- | lib/private/legacy/OC_Defaults.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/private/legacy/OC_Defaults.php b/lib/private/legacy/OC_Defaults.php index 54640a892c9..0d460ff966d 100644 --- a/lib/private/legacy/OC_Defaults.php +++ b/lib/private/legacy/OC_Defaults.php @@ -6,6 +6,10 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +use OCP\IConfig; +use OCP\Server; +use OCP\ServerVersion; + class OC_Defaults { private $theme; @@ -27,7 +31,8 @@ class OC_Defaults { private $defaultProductName; public function __construct() { - $config = \OC::$server->getConfig(); + $config = Server::get(IConfig::class); + $serverVersion = Server::get(ServerVersion::class); $this->defaultEntity = 'Nextcloud'; /* e.g. company name, used for footers and copyright notices */ $this->defaultName = 'Nextcloud'; /* short name, used when referring to the software */ @@ -39,7 +44,7 @@ class OC_Defaults { $this->defaultAndroidClientUrl = $config->getSystemValue('customclient_android', 'https://play.google.com/store/apps/details?id=com.nextcloud.client'); $this->defaultFDroidClientUrl = $config->getSystemValue('customclient_fdroid', 'https://f-droid.org/packages/com.nextcloud.client/'); $this->defaultDocBaseUrl = 'https://docs.nextcloud.com'; - $this->defaultDocVersion = \OC_Util::getVersion()[0]; // used to generate doc links + $this->defaultDocVersion = $serverVersion->getMajorVersion(); // used to generate doc links $this->defaultColorBackground = '#00679e'; $this->defaultColorPrimary = '#00679e'; $this->defaultTextColorPrimary = '#ffffff'; @@ -223,9 +228,9 @@ class OC_Defaults { if ($this->themeExist('getShortFooter')) { $footer = $this->theme->getShortFooter(); } else { - $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' . - ' rel="noreferrer noopener">' .$this->getEntity() . '</a>'. - ' – ' . $this->getSlogan(); + $footer = '<a href="' . $this->getBaseUrl() . '" target="_blank"' + . ' rel="noreferrer noopener">' . $this->getEntity() . '</a>' + . ' – ' . $this->getSlogan(); } return $footer; |