增加删除新闻的限制

This commit is contained in:
wlx 2014-06-11 03:25:53 +00:00
parent 44119d6412
commit a254e495ca
1 changed files with 9 additions and 7 deletions

View File

@ -270,13 +270,15 @@ class Archive
$this->DeleteTags($aid);
$sql = "DELETE FROM ".$this->tbl_archives." WHERE id=$aid";
@$this->db->exec($sql);
$config = \Zend_Registry::get('config');
$sql = "DELETE FROM ".$this->tbl_archives." WHERE id=$aid and sub='".$config->sub->news."'";
if ($this->db->exec($sql))
{
$sql = "DELETE FROM ".$this->tbl_catalog." WHERE aid=$aid";
@$this->db->exec($sql);
return true;
} else
return false;
}//DeleteArchives
//写入标签关系