diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index f869295d..3e30ee82 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -56,13 +56,20 @@ class Admin_DataController extends Zend_Controller_Action $this->db->query("update metadata set source=? where uuid=?",array($gmd->source,$gmd->uuid)); } $this->view->msg='成功同步黑河遥感综合实验元数据!'; - } elseif (!empty($uuid)) { + } elseif (!empty($uuid) && isset($_POST['submit'])) { //同步单条元数据 $sql=$this->db->quoteInto("select data from geonetworkmetadata where uuid=?",$uuid); if ($rs=$this->db->fetchRow($sql)) { $this->import($rs->data); $this->view->msg='成功同步元数据:'.$uuid; } else $this->view->msg='不存在此元数据:'.$uuid; + } elseif (!empty($uuid) && isset($_POST['watersubmit'])) { + //同步单条元数据 + $sql=$this->db->quoteInto("select data from watergn where uuid=?",$uuid); + if ($rs=$this->db->fetchRow($sql)) { + $this->import($rs->data); + $this->view->msg='成功同步元数据:'.$uuid; + } else $this->view->msg='不存在此元数据:'.$uuid; } elseif ($list=='water') { $sql="select uuid,title 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->view->metadata=$this->db->query($sql); diff --git a/application/admin/views/scripts/data/sync.phtml b/application/admin/views/scripts/data/sync.phtml index 3c8064d3..3ec28b74 100644 --- a/application/admin/views/scripts/data/sync.phtml +++ b/application/admin/views/scripts/data/sync.phtml @@ -34,7 +34,8 @@

同步管理员帐号到GEONETWORK

指定元数据UUID:

- + +
metadata) : ?>