merge r2241, fix import metadata's thumbnail problem
This commit is contained in:
parent
982d208853
commit
a693c9387e
|
@ -172,6 +172,7 @@ class ISO19115
|
||||||
//删除所有未用到的responsible数据
|
//删除所有未用到的responsible数据
|
||||||
$sql="delete from responsible where id not in (select distinct(resid) from role)";
|
$sql="delete from responsible where id not in (select distinct(resid) from role)";
|
||||||
$db->query($sql);
|
$db->query($sql);
|
||||||
|
$this->view->config = Zend_Registry::get('config');
|
||||||
|
|
||||||
//if (!empty($this->doi)) $row->doi=$this->doi;
|
//if (!empty($this->doi)) $row->doi=$this->doi;
|
||||||
//生成空白统计数据,可以转移到数据库端处理(todo)
|
//生成空白统计数据,可以转移到数据库端处理(todo)
|
||||||
|
@ -208,7 +209,11 @@ class ISO19115
|
||||||
$r=$db->fetchRow($sql,array($this->uuid));
|
$r=$db->fetchRow($sql,array($this->uuid));
|
||||||
if ($r)
|
if ($r)
|
||||||
{
|
{
|
||||||
$thumb=base64_encode(file_get_contents($this->view->config->geonetwork->url.'srv/cn/resources.get?access=public&id='.$r->gid.'&fname='.urlencode($this->graph['filename'])));
|
if ($this->view->config)
|
||||||
|
$geonetwork=$this->view->config->geonetwork->url;
|
||||||
|
else
|
||||||
|
$geonetwork='/geonetwork/';
|
||||||
|
$thumb=base64_encode(file_get_contents($geonetwork.'srv/cn/resources.get?access=public&id='.$r->gid.'&fname='.urlencode($this->graph['filename'])));
|
||||||
$sql="insert into thumbnail (id,data,filetype,filedesc,filename) values(?,?,?,?,?)";
|
$sql="insert into thumbnail (id,data,filetype,filedesc,filename) values(?,?,?,?,?)";
|
||||||
$db->query($sql,array($id,$thumb,$this->graph['filetype'],$this->graph['filedesc'],$this->graph['filename']));
|
$db->query($sql,array($id,$thumb,$this->graph['filetype'],$this->graph['filedesc'],$this->graph['filename']));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue