fix a bug for async mail.

This commit is contained in:
wangyidong
2015-03-13 13:33:30 +08:00
parent be5b818787
commit c4ade54fc3
3 changed files with 4 additions and 2 deletions

View File

@@ -1055,3 +1055,5 @@ $lang->changelog['7.1'][] = 'cron-delete';
$lang->changelog['7.1'][] = 'mail-browse';
$lang->changelog['7.1'][] = 'mail-delete';
$lang->changelog['7.1'][] = 'mail-batchDelete';
$lang->changelog['7.1'][] = 'dev-api';
$lang->changelog['7.1'][] = 'dev-db';

View File

@@ -242,7 +242,7 @@ class mailModel extends model
public function send($toList, $subject, $body = '', $ccList = '', $includeMe = false)
{
if(!$this->config->mail->turnon) return;
if(isset($this->config->mail->async) and $this->config->mail->async) return $this->addQueue($toList, $subject, $body, $ccList, $includeMe);
if(!empty($this->config->mail->async)) return $this->addQueue($toList, $subject, $body, $ccList, $includeMe);
ob_start();
$toList = $toList ? explode(',', str_replace(' ', '', $toList)) : array();

View File

@@ -78,7 +78,7 @@ include '../../common/view/header.html.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'));
if(common::hasPriv('mail', 'browse') and empty($config->mail->async) and !empty($config->global->cron)) echo html::linkButton($lang->mail->browse, inlink('browse'));
if(common::hasPriv('mail', 'browse') and !empty($config->mail->async) and !empty($config->global->cron)) echo html::linkButton($lang->mail->browse, inlink('browse'));
?>
</td>
</tr>