From 1492b6dccf971dde65124013e3168f95c5a6a69b Mon Sep 17 00:00:00 2001 From: wlx Date: Mon, 21 May 2012 11:33:31 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E5=90=8C=E6=AD=A5=E7=9A=84=E6=96=B0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A2=9E=E5=8A=A0=E8=AF=84=E5=AE=A1=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index e0424ed8..f52df5bc 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -51,7 +51,12 @@ class Admin_DataController extends Zend_Controller_Action $sql="delete from metadata where uuid in (select uuid from watergn)"; $this->db->query($sql); $sql="delete from responsible where id not in (select distinct(resid) from role)"; - $this->db->query($sql); + $this->db->query($sql); + //对所有的新数据增加评审状态 + $sql="insert into mdstatus (uuid,status,ts_accepted,userid) select uuid,1,now(),? + from watergn where uuid not in (select uuid from mdstatus)"; + $userid = Zend_Auth::getInstance()->getIdentity()->id; + $this->db->query($sql,array($userid)); //同步黑河遥感实验的元数据 $sql="select uuid,data,source from watergn where schemaid='iso19115'"; $rs=$this->db->fetchAll($sql);