分类:
2008-03-24 18:10:32
/**
* 查看日志及评论
*/
function actionView()
{
$tablePosts = FLEA::getSingleton('Table_Posts');
/* @var $tablePosts Table_Posts */
$post = $tablePosts->find((int)$_GET['post_id']);
if (!$post) { redirect($this->_url()); }
$tableTags =& $tablePosts->getLinkTable('tags');
$link =& $tableTags->getLink('posts');
$link->fields = array('post_id', 'title', 'created');
$link->limit = 10;
$tablePosts->assembleRecursionRow('tags', $post);
$this->_executeView(TPL_DIR . '/default_view.php', array('post' => & $post));
}
$tableTags =& $tablePosts->getLinkTable('tags');
$link =& $tableTags->getLink('posts');
$link->fields = array('post_id', 'title', 'created');
$link->limit = 10;
$tablePosts->assembleRecursionRow('tags', $post);