From ba7a4291e53bdfeb5bdbd3ebccb172d01cfee5f2 Mon Sep 17 00:00:00 2001 From: wlx Date: Mon, 16 Apr 2012 14:14:52 +0000 Subject: [PATCH] remove geonetwork host info --- application/config.ini | 2 +- application/models/ISO19115.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/application/config.ini b/application/config.ini index 73e90975..7bcd4e8a 100755 --- a/application/config.ini +++ b/application/config.ini @@ -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 diff --git a/application/models/ISO19115.php b/application/models/ISO19115.php index c2210741..1feef27f 100755 --- a/application/models/ISO19115.php +++ b/application/models/ISO19115.php @@ -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']));