增加了用户评论后推送系统消息的功能

This commit is contained in:
Li Jianxuan 2011-11-16 10:14:50 +00:00
parent 0de477b381
commit e3a25bdf1d
1 changed files with 15 additions and 9 deletions

View File

@ -632,6 +632,12 @@ class DataController extends Zend_Controller_Action
$patt['uuid'] = $formdata['uuid']; $patt['uuid'] = $formdata['uuid'];
$patt['title']= $this->view->metadata->title; $patt['title']= $this->view->metadata->title;
$patt['content']= $content; $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); $mailtp=new EmailText($this->db,"data-comment-note",$patt);
$mail=new WestdcMailer($this->view->config->smtp); $mail=new WestdcMailer($this->view->config->smtp);
$mail->setBodyText($mailtp->getBody()); $mail->setBodyText($mailtp->getBody());