实现从元数据列表的同步单条功能

This commit is contained in:
wlx 2011-09-20 08:43:48 +00:00
parent 84a9e43db2
commit 2c222af728
1 changed files with 7 additions and 0 deletions

View File

@ -97,6 +97,13 @@ class Admin_DataController extends Zend_Controller_Action
$this->import($rs->data); $this->import($rs->data);
$this->view->msg='成功同步元数据:'.$uuid; $this->view->msg='成功同步元数据:'.$uuid;
} else $this->view->msg='不存在此元数据:'.$uuid; } else $this->view->msg='不存在此元数据:'.$uuid;
} elseif (!empty($uuid)) {
//同步单条元数据
$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 ($list=='water') { } 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')"; $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); $this->view->metadata=$this->db->query($sql);