From a9c8c62e590d9ae9ec65b9d6b65db1d7e3d1299b Mon Sep 17 00:00:00 2001 From: wlx Date: Mon, 22 Apr 2013 16:04:49 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=90=8E=E5=8F=B0=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E4=B8=AD=E5=A4=96=E5=AE=A1=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=91=E5=B8=83=E9=82=AE=E4=BB=B6=E7=BB=99?= =?UTF-8?q?=E4=B8=93=E5=AE=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 3659a0a8..1baca532 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -2381,10 +2381,12 @@ class Admin_DataController extends Zend_Controller_Action } @$mail->send(); - //email to experts, sync to database? - //todo!!! - //should generate new pdf? or user could not commit a new version when it is in the reviewing process? - /* + //email to experts + $sql="select u.username,u.email from mdexpertreview e left join users u on e.id=u.id where e.status in (0,1) and e.uuid=?"; + $sth = $this->db->prepare($sql); + $sth->execute(array($row['uuid'])); + $experts = $sth->fetch(); + unset($mail); unset($mailtp); $mail=new WestdcMailer($this->view->config->smtp); @@ -2404,7 +2406,7 @@ class Admin_DataController extends Zend_Controller_Action $mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, $row['title'].'.pdf'); if($this->debug==0) { - $mail->addTo($user->email); + foreach ($experts as $expert) $mail->addTo($expert['email']); $mail->addCc($this->view->config->service->email); }else{ $mail->addTo($this->debug_email);