diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-10-03 15:14:22 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-10-10 12:34:43 +0200 |
commit | b089b857531b8091839fd8ce518a33de48838b7f (patch) | |
tree | 47405910bb4545f83cb1973a7b144d24e4092370 /settings/routes.php | |
parent | 140f3a7aa9629f441864bb3d568d0102022f6fa9 (diff) | |
download | nextcloud-server-b089b857531b8091839fd8ce518a33de48838b7f.tar.gz nextcloud-server-b089b857531b8091839fd8ce518a33de48838b7f.zip |
Refactor MailSettings controller
- Do not store the password (fixes https://github.com/owncloud/core/issues/11385)
- Refactor to AppFramework
- Add unit tests
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 19bbe0f133f..20f169cbf0a 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') @@ -84,12 +93,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') |