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