This commit is contained in:
wangyidong
2015-09-10 16:08:45 +08:00
parent 202e3e96b4
commit 5c13559737
2 changed files with 7 additions and 21 deletions

View File

@@ -331,16 +331,8 @@ class mailModel extends model
$toList = explode(',', str_replace(' ', '', $toList));
foreach($toList as $account)
{
if(!isset($emails[$account]) or isset($emails[$account]->sended)) continue;
if($this->config->mail->mta == 'sendcloud')
{
$this->mta->addAddress($account);
}
else
{
if(strpos($emails[$account]->email, '@') == false) continue;
$this->mta->addAddress($emails[$account]->email, $this->convertCharset($emails[$account]->realname));
}
if(!isset($emails[$account]) or isset($emails[$account]->sended) or strpos($emails[$account]->email, '@') == false) continue;
$this->mta->addAddress($emails[$account]->email, $this->convertCharset($emails[$account]->realname));
$emails[$account]->sended = true;
}
}
@@ -359,16 +351,8 @@ class mailModel extends model
if(!is_array($ccList)) return;
foreach($ccList as $account)
{
if(!isset($emails[$account]) or isset($emails[$account]->sended)) continue;
if($this->config->mail->mta == 'sendcloud')
{
$this->mta->addAddress($account);
}
else
{
if(strpos($emails[$account]->email, '@') == false) continue;
$this->mta->addCC($emails[$account]->email, $this->convertCharset($emails[$account]->realname));
}
if(!isset($emails[$account]) or isset($emails[$account]->sended) or strpos($emails[$account]->email, '@') == false) continue;
$this->mta->addCC($emails[$account]->email, $this->convertCharset($emails[$account]->realname));
$emails[$account]->sended = true;
}
}

View File

@@ -144,8 +144,10 @@ class release extends control
if($build->project)
{
$generatedBugs = $this->dao->select('*')->from(TABLE_BUG)->where('deleted')->eq(0)
->andWhere("(project = '" . (int)$projectID . "' " . (empty($build) ? '' : "OR CONCAT(',', openedBuild, ',') like '%,$build,%'") . ")")
->andWhere('product')->eq($release->product)
->andWhere("(project = '" . (int)$build->project . "'" . (empty($build->id) ? '' : " OR CONCAT(',', openedBuild, ',') like '%,$build->id,%'") . ")")
->andWhere('status')->eq('active')
->andWhere('toStory')->eq(0)
->orderBy('id_desc')->fetchAll();
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'newBugs');
}