移除data控制器的feedAction,并修改对应的链接到service
This commit is contained in:
parent
7c1adfd4da
commit
1a9b41aae5
|
@ -437,37 +437,7 @@ class DataController extends Zend_Controller_Action
|
|||
//$this->getResponse()->setHeader('Content-Type', 'text/html')
|
||||
// ->setBody($proc->transformToXML($xml));
|
||||
}
|
||||
function feedAction()
|
||||
{
|
||||
$feedArray = array(
|
||||
'title' => '中国西部环境与生态科学数据中心',
|
||||
'link' => 'http://'.$_SERVER['SERVER_NAME'].'/data/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";
|
||||
$rs=$this->db->fetchAll($sql);
|
||||
$feedArray['published']=strtotime($rs[0]['ts_created']);
|
||||
foreach($rs as $r)
|
||||
{
|
||||
$feedArray['entries'][] = array(
|
||||
'title' => $r['title'],
|
||||
'link' => 'http://'.$_SERVER['SERVER_NAME'].'/data/' . $r['uuid'],
|
||||
'guid' => 'http://'.$_SERVER['SERVER_NAME'].'/data/' . $r['uuid'],
|
||||
//'content'=>$r['description'],
|
||||
'description' => $r['description'],
|
||||
'lastUpdate' => strtotime($r['ts_created'])
|
||||
);
|
||||
}
|
||||
$feed = Zend_Feed::importArray($feedArray,'rss');
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
$feed->send();
|
||||
}
|
||||
|
||||
/*
|
||||
* todo: search
|
||||
*/
|
||||
|
|
|
@ -112,7 +112,7 @@ $this->headTitle()->setSeparator(' - ');
|
|||
</div><!-- /left -->
|
||||
<div class="span6">
|
||||
<div class="news_list">
|
||||
<h4><img src="/images/dbs.png" align="absmiddle" />数据最近更新<a href="/data/feed" target="_blank"><img src="images/rss.png"></a></h4>
|
||||
<h4><img src="/images/dbs.png" align="absmiddle" />数据最近更新<a href="/service/feed" target="_blank"><img src="images/rss.png"></a></h4>
|
||||
<ul class="unstyled">
|
||||
<?php foreach($this->metadata as $md) : ?>
|
||||
<li><img src="/images/westdc_20w.gif" /> <a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a> </li>
|
||||
|
|
Loading…
Reference in New Issue