From 93a47280054be341450068a6656ae38517501251 Mon Sep 17 00:00:00 2001 From: wlx Date: Sun, 4 Jul 2010 11:00:26 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=90=8C=E6=AD=A5WATER?= =?UTF-8?q?=E5=8D=95=E6=9D=A1=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 | 9 ++++++++- application/admin/views/scripts/data/sync.phtml | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) 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) : ?>