From 55bcb51e46f78560a228a25e5bdfd64af0838c78 Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 23 Nov 2011 05:01:29 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E5=8F=91=E5=B8=83=E9=82=AE=E4=BB=B6=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/ReviewController.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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('操作失败');