diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php index 4409bcca..09485c71 100644 --- a/application/admin/controllers/ReviewController.php +++ b/application/admin/controllers/ReviewController.php @@ -530,7 +530,17 @@ class Admin_ReviewController extends Zend_Controller_Action if($this->changestatus($id,5)) { - $this->messenger->addMessage('操作成功:该元数据意见成功发布'); + $this->messenger->addMessage('操作成功:该元数据意见成功发布'); + //email message + $mail=new WestdcMailer($this->view->config->smtp); + $sql="select m.title,m.uuid,array_to_string(array(select distinct(email) from role r left join responsible rs on r.resid=rs.id where r.uuid=m.uuid and length(rs.email)>4),',') as emails from mdstatus s left join metadata m on s.uuid=m.uuid where s.id=?"; + $res=$this->db->fetchRow($this->db->quoteInto($sql,$id)); + $mailtp=new EmailText($this->db,'metadata-publish',array('uuid'=>$res['uuid'],'title'=>$res['title'])); + $mail->setBodyText($mailtp->getBody()); + $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); + $mail->addTo(explode(',',$res['emails'])); + $mail->setSubject($mailtp->getSubject()); + $mail->send(); $this->_redirect("/admin/review/myreview"); }else{ $this->messenger->addMessage('操作失败');