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
This commit is contained in:
parent
ea7a4d1e75
commit
ef3afbab06
17
admin.php
17
admin.php
|
|
@ -1,17 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* ownCloud - registration
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later. See the COPYING file.
|
||||
*
|
||||
* @author Pellaeon Lin <pellaeon@cnmc.tw>
|
||||
* @copyright Pellaeon Lin 2015
|
||||
*/
|
||||
|
||||
namespace OCA\Registration\AppInfo;
|
||||
|
||||
use OCA\Registration\Controller\SettingsController;
|
||||
|
||||
$controller = \OC::$server->query(SettingsController::class);
|
||||
return $controller->displayPanel()->render();
|
||||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ This app allows users to register a new account.
|
|||
Send Ethereum to `0x941613eBB948C2C547cb957B55fEB2609fa6Fe66`
|
||||
Send BTC to `33pStaSaf4sDUA8XBAHTq7ZDQpCVFQArxQ`
|
||||
]]></description>
|
||||
<version>0.4.3</version>
|
||||
<version>0.4.4</version>
|
||||
<licence>agpl</licence>
|
||||
<author mail="pellaeon@cnmc.tw" homepage="https://nyllep.wordpress.com/about-2">Pellaeon Lin</author>
|
||||
<category>security</category>
|
||||
|
|
@ -43,4 +43,7 @@ Send BTC to `33pStaSaf4sDUA8XBAHTq7ZDQpCVFQArxQ`
|
|||
<owncloud min-version="9.0" max-version="11"/>
|
||||
<nextcloud min-version="9" max-version="15" />
|
||||
</dependencies>
|
||||
<settings>
|
||||
<admin>OCA\Registration\Settings\RegistrationSettings</admin>
|
||||
</settings>
|
||||
</info>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
namespace OCA\Registration\Settings;
|
||||
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\Settings\ISettings;
|
||||
|
||||
use OCA\Registration\Controller\SettingsController;
|
||||
|
||||
class RegistrationSettings implements ISettings {
|
||||
public function getForm() {
|
||||
$controller = \OC::$server->query(SettingsController::class);
|
||||
return $controller->displayPanel();
|
||||
}
|
||||
|
||||
public function getSection() {
|
||||
return 'additional';
|
||||
}
|
||||
|
||||
public function getPriority() {
|
||||
return 50;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Reference in New Issue