增加了评审元数据时推送管理消息的功能
This commit is contained in:
parent
1d4603573c
commit
3a6a7954b5
|
@ -314,10 +314,10 @@ class ReviewController extends Zend_Controller_Action
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
if($sth->execute())
|
if($sth->execute())
|
||||||
{
|
{
|
||||||
|
$review = $sth->fetch(PDO::FETCH_ASSOC);
|
||||||
|
$reviewid=$review['id'];
|
||||||
if(isset($_POST['atts']))
|
if(isset($_POST['atts']))
|
||||||
{
|
{
|
||||||
$review = $sth->fetch(PDO::FETCH_ASSOC);
|
|
||||||
$reviewid=$review['id'];
|
|
||||||
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",
|
||||||
|
@ -353,7 +357,7 @@ class ReviewController extends Zend_Controller_Action
|
||||||
@$mail->addCc($email); //管理员
|
@$mail->addCc($email); //管理员
|
||||||
}
|
}
|
||||||
@$mail->setSubject($subject);
|
@$mail->setSubject($subject);
|
||||||
@$mail->send();
|
@$mail->send();
|
||||||
}
|
}
|
||||||
exit();
|
exit();
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
|
|
Loading…
Reference in New Issue