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中的缩略图