From c4ade54fc3e91e40327d8b9d09a39683f82a1722 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 13 Mar 2015 13:33:30 +0800 Subject: [PATCH] fix a bug for async mail. --- module/group/lang/resource.php | 2 ++ module/mail/model.php | 2 +- module/mail/view/edit.html.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index bc0ab774a0..cb903879bb 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -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'; diff --git a/module/mail/model.php b/module/mail/model.php index 03156fb004..a53570ca3f 100644 --- a/module/mail/model.php +++ b/module/mail/model.php @@ -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(); diff --git a/module/mail/view/edit.html.php b/module/mail/view/edit.html.php index 93f0fe5809..82f9d1fac3 100755 --- a/module/mail/view/edit.html.php +++ b/module/mail/view/edit.html.php @@ -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')); ?>