发布元数据应获取元数据标题及UUID

This commit is contained in:
wlx 2012-05-04 15:15:34 +00:00
parent f32b04c179
commit d4635047a2
1 changed files with 4 additions and 1 deletions

View File

@ -647,7 +647,7 @@ class Admin_ReviewController extends Zend_Controller_Action
$user = $auth->getIdentity();
$userid = $user->id;
$sql = "select id from mdstatus where userid='$userid'";
$sql = "select id from mdstatus where id='$id' and userid='$userid'";
$rs = $this->db->query($sql);
$row = $rs->fetch();
@ -659,6 +659,9 @@ class Admin_ReviewController extends Zend_Controller_Action
$this->messenger->addMessage('操作成功:该元数据成功发布');
//email message
$mail=new WestdcMailer($this->view->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,'西部数据中心服务组');