添加更新新闻的分站限制

This commit is contained in:
wlx 2014-06-11 03:13:45 +00:00
parent ab25f11718
commit a119f356b9
1 changed files with 3 additions and 1 deletions

View File

@ -429,6 +429,8 @@ class Archive
return 0; return 0;
} }
$config = \Zend_Registry::get('config');
$sql = "UPDATE ".$this->tbl_archives." SET $sql = "UPDATE ".$this->tbl_archives." SET
userid=".$data['userid'].", userid=".$data['userid'].",
title=".$data['title'].", title=".$data['title'].",
@ -438,7 +440,7 @@ class Archive
ts_published=".$data['ts_published'].", ts_published=".$data['ts_published'].",
is_pub=".$data['is_pub'].", is_pub=".$data['is_pub'].",
body=".$data['body']." body=".$data['body']."
WHERE id=$aid"; WHERE id=$aid and sub='$config->sub->news'";
try{ try{
if($this->db->exec($sql)) if($this->db->exec($sql))
{ {