diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-10-03 15:14:22 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-10-14 15:38:34 +0200 |
commit | 13b1b45ee4bab5b832ca3a1602b4c4fb6d391f86 (patch) | |
tree | 3f8d7ef142cdc98472d883bbb18d94dbde57a939 /settings/routes.php | |
parent | 766314a6be5a24a4bd7d503d9c44998c13fe348b (diff) | |
download | nextcloud-server-13b1b45ee4bab5b832ca3a1602b4c4fb6d391f86.tar.gz nextcloud-server-13b1b45ee4bab5b832ca3a1602b4c4fb6d391f86.zip |
Refactor MailSettings controller
- Do not store the password (fixes https://github.com/owncloud/core/issues/11385)
- Refactor to AppFramework
- Add unit tests
Conflicts:
settings/admin/controller.php
Diffstat (limited to 'settings/routes.php')
-rw-r--r-- | settings/routes.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/settings/routes.php b/settings/routes.php index 25a8b1da7e0..7068c0df723 100644 --- a/settings/routes.php +++ b/settings/routes.php @@ -6,7 +6,16 @@ * See the COPYING-README file. */ -/** @var $this OCP\Route\IRouter */ +namespace OC\Settings; + +$application = new Application(); +$application->registerRoutes($this, array('routes' =>array( + array('name' => 'MailSettings#setMailSettings', 'url' => '/settings/admin/mailsettings', 'verb' => 'POST'), + array('name' => 'MailSettings#storeCredentials', 'url' => '/settings/admin/mailsettings/credentials', 'verb' => 'POST'), + array('name' => 'MailSettings#sendTestMail', 'url' => '/settings/admin/mailtest', 'verb' => 'POST'), +))); + +/** @var $this \OCP\Route\IRouter */ // Settings pages $this->create('settings_help', '/settings/help') @@ -88,12 +97,6 @@ $this->create('settings_ajax_getlog', '/settings/ajax/getlog.php') ->actionInclude('settings/ajax/getlog.php'); $this->create('settings_ajax_setloglevel', '/settings/ajax/setloglevel.php') ->actionInclude('settings/ajax/setloglevel.php'); -$this->create('settings_mail_settings', '/settings/admin/mailsettings') - ->post() - ->action('OC\Settings\Admin\Controller', 'setMailSettings'); -$this->create('settings_admin_mail_test', '/settings/admin/mailtest') - ->post() - ->action('OC\Settings\Admin\Controller', 'sendTestMail'); $this->create('settings_ajax_setsecurity', '/settings/ajax/setsecurity.php') ->actionInclude('settings/ajax/setsecurity.php'); $this->create('settings_ajax_excludegroups', '/settings/ajax/excludegroups.php') |