增加了评审元数据时推送管理消息的功能

This commit is contained in:
Li Jianxuan 2011-11-16 10:02:42 +00:00
parent 1d4603573c
commit 3a6a7954b5
1 changed files with 8 additions and 4 deletions

View File

@ -313,11 +313,11 @@ class ReviewController extends Zend_Controller_Action
$sql = "insert into mdreview ($keys) values ($values) RETURNING id"; $sql = "insert into mdreview ($keys) values ($values) RETURNING id";
$sth = $this->db->prepare($sql); $sth = $this->db->prepare($sql);
if($sth->execute()) if($sth->execute())
{
if(isset($_POST['atts']))
{ {
$review = $sth->fetch(PDO::FETCH_ASSOC); $review = $sth->fetch(PDO::FETCH_ASSOC);
$reviewid=$review['id']; $reviewid=$review['id'];
if(isset($_POST['atts']))
{
try{ try{
foreach($_POST['atts'] as $v) foreach($_POST['atts'] as $v)
{ {
@ -329,6 +329,10 @@ class ReviewController extends Zend_Controller_Action
if($data['status']>=0) if($data['status']>=0)
{ {
echo '<script>$("#postcomment").remove();</script>'; echo '<script>$("#postcomment").remove();</script>';
$title = "收到新元数据评审意见";
$msg = "用户".$user->username."对元数据《".$md['title']."》发布了评审意见,<a href=\"/admin/review/comments/ac/view/id/".$reviewid."\">点击查看</a>";
include_once("message.php");
message::post($this->db,0,-1,$title,$msg);
@$mailtp=new EmailText( @$mailtp=new EmailText(
$this->db, $this->db,
"mdreview-post-comment", "mdreview-post-comment",