diff --git a/module/mail/control.php b/module/mail/control.php index ce2f89e097..0ccfd7f41c 100755 --- a/module/mail/control.php +++ b/module/mail/control.php @@ -158,4 +158,16 @@ class mail extends control $this->view->users = $this->dao->select('account, CONCAT(realname, " ", email) AS email' )->from(TABLE_USER)->where('email')->ne('')->orderBy('account')->fetchPairs(); $this->display(); } + + /** + * Reset the email config. + * + * @access public + * @return void + */ + public function reset() + { + $this->dao->delete('*')->from(TABLE_CONFIG)->where('module')->eq('mail')->exec(); + $this->locate(inlink('detect')); + } } diff --git a/module/mail/lang/en.php b/module/mail/lang/en.php index be7d4c8c3f..c1661e55c1 100755 --- a/module/mail/lang/en.php +++ b/module/mail/lang/en.php @@ -5,6 +5,7 @@ $lang->mail->detect = 'Detect'; $lang->mail->edit = 'Configure'; $lang->mail->save = 'Successfully saved'; $lang->mail->test = 'Testing'; +$lang->mail->reset = 'Reset'; $lang->mail->turnon = 'Turnon'; $lang->mail->fromAddress = 'From email'; diff --git a/module/mail/lang/zh-cn.php b/module/mail/lang/zh-cn.php index ec9cabb21f..55c0bd1efd 100755 --- a/module/mail/lang/zh-cn.php +++ b/module/mail/lang/zh-cn.php @@ -5,6 +5,7 @@ $lang->mail->detect = '检测'; $lang->mail->edit = '编辑配置'; $lang->mail->save = '成功保存'; $lang->mail->test = '测试发信'; +$lang->mail->reset = '重置'; $lang->mail->turnon = '是否打开'; $lang->mail->fromAddress = '发信邮箱'; diff --git a/module/mail/view/edit.html.php b/module/mail/view/edit.html.php index 978e3e318f..a1c74bc863 100755 --- a/module/mail/view/edit.html.php +++ b/module/mail/view/edit.html.php @@ -64,6 +64,7 @@ include '../../common/view/header.html.php'; config->mail->turnon and $mailExist) echo html::linkButton($lang->mail->test, inlink('test')); + echo html::linkButton($lang->mail->reset, inlink('reset')); ?>