From 2c474145f521166bb4a76cc82987e06235eb47a8 Mon Sep 17 00:00:00 2001 From: wlx Date: Fri, 21 Jun 2013 09:05:21 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=83=BD=E5=8F=91?= =?UTF-8?q?=E9=82=AE=E4=BB=B6=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/models/data/Review.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/application/models/data/Review.php b/application/models/data/Review.php index 3fb2ac4a..a0d23623 100644 --- a/application/models/data/Review.php +++ b/application/models/data/Review.php @@ -239,14 +239,15 @@ class ReviewListener implements Zend_EventManager_ListenerAggregate $this->db->query($sql,array($id)); //email message if(isset($emails) &&is_array($emails) && count($emails)>0) - { - $mail=new WestdcMailer($this->view->config->smtp); + { + $config=Zend_Registry::get('config'); + $mail=new WestdcMailer($config->smtp); $sql="select m.uuid,m.title from metadata m left join mdstatus s on m.uuid=s.uuid where s.id='$id'"; $rs=$this->db->query($sql); $res=$rs->fetch(); $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->setBodyText($mailtp->getBody()); + $mail->setFrom($config->service->email,'西部数据中心服务组'); foreach($emails as $email) $mail->addTo($email); $mail->setSubject($mailtp->getSubject()); $mail->send();