增加了用户评论后推送系统消息的功能
This commit is contained in:
parent
0de477b381
commit
e3a25bdf1d
|
@ -632,6 +632,12 @@ class DataController extends Zend_Controller_Action
|
|||
$patt['uuid'] = $formdata['uuid'];
|
||||
$patt['title']= $this->view->metadata->title;
|
||||
$patt['content']= $content;
|
||||
|
||||
$title = "收到新数据评论";
|
||||
$msg = "用户".$user->username."对元数据《".$patt['title']."》进行了评论,<a href=\"/admin/data/comment\">点击查看</a>";
|
||||
include_once("message.php");
|
||||
message::post($this->db,0,-1,$title,$msg);
|
||||
|
||||
$mailtp=new EmailText($this->db,"data-comment-note",$patt);
|
||||
$mail=new WestdcMailer($this->view->config->smtp);
|
||||
$mail->setBodyText($mailtp->getBody());
|
||||
|
@ -647,15 +653,15 @@ class DataController extends Zend_Controller_Action
|
|||
$formdata['email']=$user->email;
|
||||
}
|
||||
$commentForm->populate($formdata);
|
||||
$this->view->commentForm=$commentForm;
|
||||
//自动跳转
|
||||
$sql="select s.* from datasource d left join source s on d.sourceid=s.id where d.uuid=?";
|
||||
$row=$this->db->fetchRow($this->db->quoteInto($sql,$uuid));
|
||||
$jump=(int)$this->_request->getParam('jump');
|
||||
if (empty($jump)) $jump=1;//默认跳转
|
||||
if (@$row->has_pages && ($jump!=0))
|
||||
{
|
||||
$this->_helper->viewRenderer($row->code.'/view',null,true);
|
||||
$this->view->commentForm=$commentForm;
|
||||
//自动跳转
|
||||
$sql="select s.* from datasource d left join source s on d.sourceid=s.id where d.uuid=?";
|
||||
$row=$this->db->fetchRow($this->db->quoteInto($sql,$uuid));
|
||||
$jump=(int)$this->_request->getParam('jump');
|
||||
if (empty($jump)) $jump=1;//默认跳转
|
||||
if (@$row->has_pages && ($jump!=0))
|
||||
{
|
||||
$this->_helper->viewRenderer($row->code.'/view',null,true);
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue