fix rss feed problem
This commit is contained in:
parent
4e389f5c77
commit
8facb0cc68
|
@ -18,6 +18,7 @@ class ServiceController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$this->db=Zend_Registry::get('db');
|
$this->db=Zend_Registry::get('db');
|
||||||
$this->view->config = $this->config = Zend_Registry::get('config');
|
$this->view->config = $this->config = Zend_Registry::get('config');
|
||||||
|
$this->submd = $this->view->config->sub->metadata;
|
||||||
//$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
//$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
||||||
//$this->view->messages = $this->messenger->getMessages();
|
//$this->view->messages = $this->messenger->getMessages();
|
||||||
}
|
}
|
||||||
|
@ -189,16 +190,16 @@ class ServiceController extends Zend_Controller_Action
|
||||||
function feedAction()
|
function feedAction()
|
||||||
{
|
{
|
||||||
$feedArray = array(
|
$feedArray = array(
|
||||||
'title' => '中国西部环境与生态科学数据中心',
|
'title' => '三江源生态监测综合服务平台',
|
||||||
'link' => 'http://'.$_SERVER['SERVER_NAME'].'/data/feed',
|
'link' => 'http://'.$_SERVER['SERVER_NAME'].'/service/feed',
|
||||||
'description' => '共享西部计划产生的数据',
|
'description' => '管理、共享三江源生态监测数据',
|
||||||
'language' => 'zh-CN',
|
'language' => 'zh-CN',
|
||||||
'charset' => 'utf-8',
|
'charset' => 'utf-8',
|
||||||
'published' => time(),
|
'published' => time(),
|
||||||
//'generator' => 'Zend Framework Zend_Feed',
|
//'generator' => 'Zend Framework Zend_Feed',
|
||||||
'entries' => array()
|
'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);
|
$rs=$this->db->fetchAll($sql);
|
||||||
$feedArray['published']=strtotime($rs[0]['ts_created']);
|
$feedArray['published']=strtotime($rs[0]['ts_created']);
|
||||||
foreach($rs as $r)
|
foreach($rs as $r)
|
||||||
|
|
Loading…
Reference in New Issue