更新新闻首页的分平台限制

This commit is contained in:
wlx 2014-06-12 06:53:09 +00:00
parent 75ae4ff252
commit fb0bfea245
1 changed files with 5 additions and 8 deletions

View File

@ -12,14 +12,10 @@ class ArchivesController extends Zend_Controller_Action
$this->view->nav = array(
array('link'=>'/','title'=>'<i class="icon-home"></i>'),
array('link'=>'/archives','title'=>'新闻'),
);
);
$this->subnews=$this->view->config->sub->news;
}
function testAction()
{
$this->_helper->viewRenderer('archive-view-player');
}
function indexAction()
{
$News = new Archive($this->db);
@ -52,7 +48,8 @@ class ArchivesController extends Zend_Controller_Action
$sql = "SELECT n.*,c.title as typetitle,c.code FROM ".$News->tbl_archives." n
left join ".$News->tbl_catalog." ct on ct.aid=n.id
left join ".$News->tbl_categorys." c on c.id = ct.cid
WHERE n.ts_published<'$time' AND ct.cid={$v['id']} AND n.is_pub=true
WHERE n.ts_published<'$time' AND ct.cid={$v['id']} AND n.is_pub=true
and n.sub='$this->subnews'
ORDER BY ts_published DESC
LIMIT 10";