From ef3afbab06165bf0e9bcdb4a85a055a71c5df05b Mon Sep 17 00:00:00 2001 From: Pellaeon Lin Date: Wed, 10 Oct 2018 11:47:54 +0800 Subject: [PATCH] Update# use the new way to register settings section, bump to 0.4.4 ref: https://docs.nextcloud.com/server/14/developer_manual/app/settings.html --- admin.php | 17 ----------------- appinfo/app.php | 2 -- appinfo/info.xml | 5 ++++- lib/Settings/RegistrationSettings.php | 24 ++++++++++++++++++++++++ 4 files changed, 28 insertions(+), 20 deletions(-) delete mode 100644 admin.php create mode 100644 lib/Settings/RegistrationSettings.php diff --git a/admin.php b/admin.php deleted file mode 100644 index b8f3323..0000000 --- a/admin.php +++ /dev/null @@ -1,17 +0,0 @@ - - * @copyright Pellaeon Lin 2015 - */ - -namespace OCA\Registration\AppInfo; - -use OCA\Registration\Controller\SettingsController; - -$controller = \OC::$server->query(SettingsController::class); -return $controller->displayPanel()->render(); diff --git a/appinfo/app.php b/appinfo/app.php index 167c161..9fb614d 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -15,5 +15,3 @@ namespace OCA\Registration\AppInfo; 'name' => \OC::$server->getL10N('registration')->t('Register'), 'href' => \OC::$server->getURLGenerator()->linkToRoute('registration.register.askEmail') ]); - -\OCP\App::registerAdmin('registration', 'admin'); diff --git a/appinfo/info.xml b/appinfo/info.xml index bf12f46..1514684 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -27,7 +27,7 @@ This app allows users to register a new account. Send Ethereum to `0x941613eBB948C2C547cb957B55fEB2609fa6Fe66` Send BTC to `33pStaSaf4sDUA8XBAHTq7ZDQpCVFQArxQ` ]]> - 0.4.3 + 0.4.4 agpl Pellaeon Lin security @@ -43,4 +43,7 @@ Send BTC to `33pStaSaf4sDUA8XBAHTq7ZDQpCVFQArxQ` + + OCA\Registration\Settings\RegistrationSettings + diff --git a/lib/Settings/RegistrationSettings.php b/lib/Settings/RegistrationSettings.php new file mode 100644 index 0000000..32d2864 --- /dev/null +++ b/lib/Settings/RegistrationSettings.php @@ -0,0 +1,24 @@ +query(SettingsController::class); + return $controller->displayPanel(); + } + + public function getSection() { + return 'additional'; + } + + public function getPriority() { + return 50; + } +} + +?>