From 8102223a87e71d5470eaea736237fc0813b4d820 Mon Sep 17 00:00:00 2001 From: wlx Date: Mon, 23 Jun 2014 06:56:40 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=91=E5=B8=83=E5=90=8E?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/models/data/Review.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/application/models/data/Review.php b/application/models/data/Review.php index 574aa485..4b66673d 100644 --- a/application/models/data/Review.php +++ b/application/models/data/Review.php @@ -276,7 +276,7 @@ class Review extends Zend_Controller_Plugin_Abstract include_once("helper/view.php"); $userid = (int)view::User('id'); } - $sql = "select id from mdstatus where id=$id and userid=$userid"; + $sql = "select id from en.mdstatus where id=$id and userid=$userid"; $rs = $this->db->query($sql); $row = $rs->fetch(); @@ -368,22 +368,22 @@ class ReviewListener implements Zend_EventManager_ListenerAggregate if(is_numeric($id)) { //发布正式版本 - $sql = "UPDATE mdversion SET changelog=?,userid=? WHERE id in (select id from mdversion where uuid in (select uuid from mdstatus where id=?) order by ts_created desc limit 1)"; - $this->db->query($sql,array('发布第一个正式版本 version 1.0',$userid,$id)); + $sql = "UPDATE en.mdversion SET changelog=?,userid=? WHERE id in (select id from en.mdversion where uuid in (select uuid from en.mdstatus where id=?) order by ts_created desc limit 1)"; + $this->db->query($sql,array('Version 1.0 Released.',$userid,$id)); //删除所有的中间版本 - $sql="delete from mdversion where changelog is null and uuid in (select uuid from mdstatus where id=?)"; + $sql="delete from en.mdversion where changelog is null and uuid in (select uuid from en.mdstatus where id=?)"; $this->db->query($sql,array($id)); //email message if(isset($emails) &&is_array($emails) && count($emails)>0) { $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'"; + $sql="select m.uuid,m.title from en.metadata m left join en.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'])); + $mailtp=new EmailText($this->db,'metadata-publish-en',array('uuid'=>$res['uuid'],'title'=>$res['title'])); $mail->setBodyText($mailtp->getBody()); - $mail->setFrom($config->service->email,'西部数据中心服务组'); + $mail->setFrom($config->service->email,'CARD support group'); foreach($emails as $email) $mail->addTo($email); $mail->setSubject($mailtp->getSubject()); $mail->send(); @@ -395,10 +395,10 @@ class ReviewListener implements Zend_EventManager_ListenerAggregate foreach($id as $v) { //发布正式版本 - $sql = "UPDATE mdversion SET changelog=?,userid=? WHERE id in (select id from mdversion where uuid in (select uuid from mdstatus where id=?) order by ts_created desc limit 1)"; - $this->db->query($sql,array('发布第一个正式版本 version 1.0',$userid,$v)); + $sql = "UPDATE en.mdversion SET changelog=?,userid=? WHERE id in (select id from en.mdversion where uuid in (select uuid from en.mdstatus where id=?) order by ts_created desc limit 1)"; + $this->db->query($sql,array('Version 1.0 Released.',$userid,$v)); //删除所有的中间版本 - $sql="delete from mdversion where changelog is null and uuid in (select uuid from mdstatus where id=?)"; + $sql="delete from en.mdversion where changelog is null and uuid in (select uuid from en.mdstatus where id=?)"; $this->db->query($sql,array($v)); } }