实现geonetwork缩略图的自动同步(ticket #127)

This commit is contained in:
wlx 2010-01-06 02:48:25 +00:00
parent 7c61f2bf6c
commit bba20a7197
1 changed files with 7 additions and 1 deletions

View File

@ -68,7 +68,7 @@ class Admin_DataController extends Zend_Controller_Action
}
$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";
$sql="select g.id as gid,m.uuid,t.* from watergn g left join metadata m on m.uuid=g.uuid left join thumbnail t on t.id=m.id 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->watergeonetwork->url.'srv/cn/resources.get?access=public&id='.$row->gid.'&fname='.urlencode($row->filename));
@ -732,6 +732,12 @@ class Admin_DataController extends Zend_Controller_Action
} elseif ($iso->graph) {
$trow->id=$id;
//$trow->data=$iso->graph['data'];
$sql="select id as gid from geonetworkmetadata where uuid=?";
$r=$this->db->fetchRow($sql,array($iso->uuid));
if ($r)
{
$trow->data=base64_encode(file_get_contents($this->view->config->geonetwork->url.'srv/cn/resources.get?access=public&id='.$r->gid.'&fname='.urlencode($iso->graph['filename'])));
}
$trow->filetype=$iso->graph['filetype'];
$trow->filedesc=$iso->graph['filedesc'];
$trow->filename=$iso->graph['filename'];