remove geonetwork host info

This commit is contained in:
wlx 2012-04-16 14:14:52 +00:00
parent 52d70da5d1
commit ba7a4291e5
2 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,7 @@ db.params.username = gis
db.params.password = gispassword
db.params.dbname = xining
geonetwork.url=http://xining.westgis.ac.cn/geonetwork/
geonetwork.url=/geonetwork/
geonetwork.adapter = PDO_PGSQL
geonetwork.params.host = localhost
geonetwork.params.username = gis

View File

@ -209,10 +209,11 @@ class ISO19115
$r=$db->fetchRow($sql,array($this->uuid));
if ($r)
{
$geonetwork="http://".$_SERVER['SERVER_NAME'];
if ($this->view->config)
$geonetwork=$this->view->config->geonetwork->url;
$geonetwork.=$this->view->config->geonetwork->url;
else
$geonetwork='/geonetwork/';
$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(?,?,?,?,?)";
$db->query($sql,array($id,$thumb,$this->graph['filetype'],$this->graph['filedesc'],$this->graph['filename']));