From dc887db3bcb8cf5337b9b7732afcd4113ec40839 Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 25 Oct 2011 07:34:26 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=A0=E9=99=A4GEONETWORK?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E5=85=83=E6=95=B0=E6=8D=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 10 ++++++++++ application/admin/views/scripts/data/sync.phtml | 1 + 2 files changed, 11 insertions(+) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index b4b61914..bbac219e 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -113,6 +113,16 @@ class Admin_DataController extends Zend_Controller_Action $sql="delete from metadata where uuid not in (select uuid from geonetworkmetadata where schemaid='iso19115')"; $this->db->query($sql); $this->view->msg='已删除WESTDC中多出的元数据!'; + } elseif ($delete=='geonetwork') { + //dblink view中删除多条有问题,暂时用单条删除替代 + //$sql="delete from geonetworkmetadata where uuid not in (select uuid from metadata)"; + $sql="select uuid from geonetworkmetadata where uuid not in (select uuid from metadata)"; + $rows=$this->db->fetchAll($sql); + foreach($rows as $row) + { + $this->db->exec($this->db->quoteInto("delete from geonetworkmetadata where uuid=?",$row->uuid)); + } + $this->view->msg='已删除GEONETWORK中多出的元数据!'; } elseif ($delete=='water') { $sql="delete from metadata where uuid not in (select uuid from watergn where schemaid='iso19115') and uuid not in (select uuid from geonetworkmetadata where schemaid='iso19115')"; $this->db->query($sql); diff --git a/application/admin/views/scripts/data/sync.phtml b/application/admin/views/scripts/data/sync.phtml index aac98b46..dd3d5833 100644 --- a/application/admin/views/scripts/data/sync.phtml +++ b/application/admin/views/scripts/data/sync.phtml @@ -29,6 +29,7 @@

开始同步:从WESTDC同步到GEONETWORK

列出WESTDC中多出的WATER元数据

删除WESTDC中多出的元数据

+

删除GEONETWORK中多出的元数据

删除WESTDC中多出的WATER元数据

同步GEONETWORK中的缩略图

同步WATER中的缩略图