实现同步黑河试验元数据缩略图功能
This commit is contained in:
parent
a754bfd2f7
commit
6a97ffe006
|
@ -67,6 +67,15 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
$this->db->query($sql,array(base64_encode($data),$row->id));
|
||||
}
|
||||
$this->view->msg='已成功同步缩略图!';
|
||||
} elseif ($thumb=='water') {
|
||||
$sql="select g.id as gid,m.uuid,t.* from thumbnail t left join metadata m on t.id=m.id left join watergn g on m.uuid=g.uuid where t.filetype is not null and t.filename is not null";
|
||||
$rows=$this->db->fetchAll($sql);
|
||||
foreach($rows as $row) {
|
||||
$data=file_get_contents($this->view->config->geonetwork->url.'srv/cn/resources.get?access=public&id='.$row->gid.'&fname='.urlencode($row->filename));
|
||||
$sql="update thumbnail set data=? where id=?";
|
||||
$this->db->query($sql,array(base64_encode($data),$row->id));
|
||||
}
|
||||
$this->view->msg='已成功同步缩略图!';
|
||||
} elseif ($adminuser=='geonetwork') {
|
||||
$sql="select id,username,password,email from users where usertype='administrator'";
|
||||
$rows=$this->db->fetchAll($sql);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
<p><a href="/admin/data/sync/source/watergn">开始同步:从water同步到WESTDC,若有冲突,以water为准</a> </p>
|
||||
<p><a href="/admin/data/sync/delete/westdc">删除WESTDC中多出的元数据</a></p>
|
||||
<p><a href="/admin/data/sync/thumb/geonetwork">同步GEONETWORK中的缩略图</a></p>
|
||||
<p><a href="/admin/data/sync/thumb/water">同步WATER中的缩略图</a></p>
|
||||
<p><a href="/admin/data/sync/adminuser/geonetwork">同步管理员帐号到GEONETWORK</a></p>
|
||||
<form method="POST">
|
||||
<p>指定元数据UUID: <input type="text" name="uuid"></p>
|
||||
|
|
Loading…
Reference in New Issue