17 lines
640 B
PHP
Executable File
17 lines
640 B
PHP
Executable File
<?php
|
|
class KnowledgeController extends Zend_Controller_Action
|
|
{
|
|
function indexAction()
|
|
{
|
|
//$this->_redirect('/metadata');
|
|
$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";
|
|
$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();
|
|
}
|
|
} |