From 8facb0cc684a0da093830537123acc7eb93e9596 Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 18 Jun 2014 14:44:16 +0000 Subject: [PATCH] fix rss feed problem --- application/default/controllers/ServiceController.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index abebdec0..4467822a 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -18,6 +18,7 @@ class ServiceController extends Zend_Controller_Action { $this->db=Zend_Registry::get('db'); $this->view->config = $this->config = Zend_Registry::get('config'); + $this->submd = $this->view->config->sub->metadata; //$this->messenger=$this->_helper->getHelper('FlashMessenger'); //$this->view->messages = $this->messenger->getMessages(); } @@ -189,16 +190,16 @@ class ServiceController extends Zend_Controller_Action function feedAction() { $feedArray = array( - 'title' => '中国西部环境与生态科学数据中心', - 'link' => 'http://'.$_SERVER['SERVER_NAME'].'/data/feed', - 'description' => '共享西部计划产生的数据', + 'title' => '三江源生态监测综合服务平台', + 'link' => 'http://'.$_SERVER['SERVER_NAME'].'/service/feed', + 'description' => '管理、共享三江源生态监测数据', 'language' => 'zh-CN', 'charset' => 'utf-8', 'published' => time(), //'generator' => 'Zend Framework Zend_Feed', 'entries' => array() ); - $sql="select * from normalmetadata order by ts_created desc"; + $sql="select * from $this->submd order by ts_created desc"; $rs=$this->db->fetchAll($sql); $feedArray['published']=strtotime($rs[0]['ts_created']); foreach($rs as $r)