diff --git a/application/config.ini b/application/config.ini index ceef3299..131b9a9f 100755 --- a/application/config.ini +++ b/application/config.ini @@ -21,6 +21,8 @@ visual_db.port = 5432 auth.identifier = grassland auth.groupname = 青海省草原总站 +sub.metadata = grasslandmd +sub.search = grasslandmd google.maps.api=ABQIAAAACD-MqkkoOm60o_dvwdcKVhRBSKpgcP88GYi6r2Of16IkMX_4YhSBQsywCi4J2_fh4nBuWmK7gyRjLg bing.api=4BC90E1E9ED351ECE0D9FB71509BC3CC1264340C @@ -32,7 +34,6 @@ paths.newsletter=images/newsletter/ logging.file = /var/www/test.westgis.ac.cn/data/logs/debug.log page.limit=10 import.dir=../data/import -sub.metadata = grasslandmd title.site=青海省草原总站 title.data=数据产品与服务 title.review=数据评审 diff --git a/application/models/Search.php b/application/models/Search.php index f66b64e1..0357f918 100644 --- a/application/models/Search.php +++ b/application/models/Search.php @@ -65,8 +65,9 @@ class Search } function __construct($text='') { - require_once '/home/wlx/xunsearch/sdk/php/lib/XS.php'; - $this->xs=new XS('westdc'); + require_once '/home/wlx/xunsearch/sdk/php/lib/XS.php'; + $config = Zend_Registry::get('config'); + $this->xs=new XS($config->sub->search); $this->search=$this->xs->search; $this->terms = array(); $this->text=$text;