From a119f356b94aa72263723aad4da4a4fcfcd9edb3 Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 11 Jun 2014 03:13:45 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9B=B4=E6=96=B0=E6=96=B0?= =?UTF-8?q?=E9=97=BB=E7=9A=84=E5=88=86=E7=AB=99=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/models/Archive.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)) {