All pastes #561046 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-06-12 09:54 UTC
rendered paste body
function forum($forum_id)
{
	$this->Forum->id				= $forum_id;
	$this->ForumThread->bindModel(array('belongsTo' => array('LastPost' => array('className'  => 'User', 'foreignKey' => 'lastpost_user_id'))));
	$this->paginate					= array('conditions' => array('ForumThread.forum_id' => $forum_id), 'limit' => '15', 'order' => 'ForumThread.lastpost_time DESC');
	$this->ForumThread->recursive	= 1;

	// data to view
	$data = $this->paginate($this->ForumThread);
	$this->set('data', $data);
}