summaryrefslogtreecommitdiffstats
path: root/lib/private/Settings
diff options
context:
space:
mode:
authorMichael Weimann <mail@michael-weimann.eu>2018-12-18 22:07:41 +0100
committerMichael Weimann <mail@michael-weimann.eu>2019-01-14 00:07:36 +0100
commit6993faaf67b6e822f7b03bd972fe42c9b4dd1d5d (patch)
treedc2492d0190c4a098ae4275163433b354a55fb20 /lib/private/Settings
parent107fab9dfad01ac8d6532e1a3e3758d444a114b0 (diff)
downloadnextcloud-server-6993faaf67b6e822f7b03bd972fe42c9b4dd1d5d.tar.gz
nextcloud-server-6993faaf67b6e822f7b03bd972fe42c9b4dd1d5d.zip
Add the "server info" settings
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
Diffstat (limited to 'lib/private/Settings')
-rw-r--r--lib/private/Settings/Admin/ServerInfo.php43
-rw-r--r--lib/private/Settings/Manager.php2
-rw-r--r--lib/private/Settings/Personal/PersonalInfo.php2
3 files changed, 46 insertions, 1 deletions
diff --git a/lib/private/Settings/Admin/ServerInfo.php b/lib/private/Settings/Admin/ServerInfo.php
new file mode 100644
index 00000000000..e4c7a83ed87
--- /dev/null
+++ b/lib/private/Settings/Admin/ServerInfo.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace OC\Settings\Admin;
+
+use OCP\AppFramework\Http\TemplateResponse;
+use OCP\Settings\ISettings;
+
+/**
+ * Class ServerInfo
+ *
+ * @package OC\Settings\Admin
+ */
+class ServerInfo implements ISettings {
+
+ /**
+ * @return TemplateResponse
+ */
+ public function getForm() {
+ $parameters = [];
+ return new TemplateResponse('settings', 'settings/admin/server-info', $parameters, '');
+ }
+
+ /**
+ * Returns the server info section id.
+ *
+ * @return string
+ */
+ public function getSection() {
+ return 'server-info';
+ }
+
+ /**
+ * Returns the server info settings priority.
+ *
+ * @return int whether the form should be rather on the top or bottom of
+ * the admin section. The forms are arranged in ascending order of the
+ * priority values. It is required to return a value between 0 and 100.
+ */
+ public function getPriority() {
+ return 20;
+ }
+
+}
diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php
index 42ec16e223b..e20afd44038 100644
--- a/lib/private/Settings/Manager.php
+++ b/lib/private/Settings/Manager.php
@@ -231,6 +231,8 @@ class Manager implements IManager {
$forms[$form->getPriority()] = [$form];
$form = $this->container->query(Admin\Mail::class);
$forms[$form->getPriority()] = [$form];
+ $form = $this->container->query(Admin\ServerInfo::class);
+ $forms[$form->getPriority()] = [$form];
}
if ($section === 'security') {
/** @var ISettings $form */
diff --git a/lib/private/Settings/Personal/PersonalInfo.php b/lib/private/Settings/Personal/PersonalInfo.php
index bd9cd263260..42a89a5f309 100644
--- a/lib/private/Settings/Personal/PersonalInfo.php
+++ b/lib/private/Settings/Personal/PersonalInfo.php
@@ -141,7 +141,7 @@ class PersonalInfo implements ISettings {
'twitterVerification' => $userData[AccountManager::PROPERTY_TWITTER]['verified'],
'groups' => $this->getGroups($user),
'dataLocation' => 'Germany',
- 'provider' => 'Hetzner Online GmbH',
+ 'provider' => 'Mustermann GmbH',
'providerLink' => 'https://www.hetzner.de/',
'providerPrivacyLink' => 'https://www.hetzner.de/rechtliches/datenschutz',
'encryptionEnabled' => true || $this->encryptionManager->isEnabled(),