修复接受单条数据的错误

This commit is contained in:
wlx 2013-06-10 14:45:31 +00:00
parent 1685942a13
commit ae389ecc7c
1 changed files with 6 additions and 6 deletions

View File

@ -738,14 +738,14 @@ class Admin_ReviewController extends Zend_Controller_Action
$sql="select distinct u.email,m.title,m.uuid from mdstatus s left join metadata m on s.uuid=m.uuid $sql="select distinct u.email,m.title,m.uuid from mdstatus s left join metadata m on s.uuid=m.uuid
left join mdauthor a on s.uuid=a.uuid left join users u on a.userid=u.id where s.id=? order by u.email"; left join mdauthor a on s.uuid=a.uuid left join users u on a.userid=u.id where s.id=? order by u.email";
$rs=$this->db->query($sql,array($ids)); $rs=$this->db->query($sql,array($ids));
$rows=$rs->fetchAll($rs); $rows=$rs->fetchAll();
if ($rows) if ($rows)
{ {
//有数据作者 //有数据作者
$mail=array(); $email=array();
foreach ($rows as $row) foreach ($rows as $row)
{ {
$mail[]=$row['email']; $email[]=$row['email'];
} }
$title=$rows[0]['title']; $title=$rows[0]['title'];
$uuid=$rows[0]['uuid']; $uuid=$rows[0]['uuid'];
@ -753,12 +753,12 @@ class Admin_ReviewController extends Zend_Controller_Action
$mail=new WestdcMailer($this->view->config->smtp); $mail=new WestdcMailer($this->view->config->smtp);
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); $mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mailtp=new EmailText($this->db,"review-new-accept",array( $mailtp=new EmailText($this->db,"review-new-accept",array(
'uuid' => $iso->uuid, 'uuid' => $uuid,
'title'=> $iso->resTitle 'title'=> $title
)); ));
$mail->setBodyText($mailtp->getBody()); $mail->setBodyText($mailtp->getBody());
$mail->setSubject($mailtp->getSubject()); $mail->setSubject($mailtp->getSubject());
$mail->addTo($mail); $mail->addTo($email);
$mail->addCC($this->view->config->service->email); $mail->addCC($this->view->config->service->email);
$mail->send(); $mail->send();
} }