westdc-zf1/application/default/controllers/KnowledgeController.php

17 lines
640 B
PHP
Raw Normal View History

2009-03-06 03:20:46 +00:00
<?php
class KnowledgeController extends Zend_Controller_Action
{
function indexAction()
{
//$this->_redirect('/metadata');
2011-10-29 08:27:22 +00:00
$sql="select a.author,c.* from knl_article c left join knl_author a on c.item_id=a.item_id where c.url <>'' and a.place=1 order by ts_created desc limit 10";
2009-03-06 03:20:46 +00:00
$this->view->articles=$this->db->fetchAll($sql);
}
function preDispatch()
{
$this->db=Zend_Registry::get('db');
$this->view->config = Zend_Registry::get('config');
$this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages();
}
}