* code for task#1639.

This commit is contained in:
xia0ta0
2013-08-01 14:33:39 +08:00
parent 6612defc02
commit 73daf4dc85
4 changed files with 15 additions and 0 deletions
+12
View File
@@ -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'));
}
}
+1
View File
@@ -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';
+1
View File
@@ -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 = '发信邮箱';
+1
View File
@@ -64,6 +64,7 @@ include '../../common/view/header.html.php';
<?php
echo html::submitButton();
if($this->config->mail->turnon and $mailExist) echo html::linkButton($lang->mail->test, inlink('test'));
echo html::linkButton($lang->mail->reset, inlink('reset'));
?>
</td>
</tr>