All pastes #539794 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-05 10:57 UTC
rendered paste body
<?php

class ForumsController extends AppController
{
	var $uses		= array('Forum','ForumThread','ForumPost');
	var $helpers	= array('Time','Form','Paginator');

	///////////////////////////////////////////////////////////////////////////
	function index($forum_id = 0)
	{
		$this->Forum->recursive = 0;

		$this->set('data', $this->Forum->findAll('','','Forum.forum_category_id ASC, Forum.title ASC'));
	}
	///////////////////////////////////////////////////////////////////////////
	function forum($forum_id)
	{
		$this->Forum->id = $forum_id;
		//$this->ForumThread->paginate	= array('conditions' => array('ForumThread.forum_id' => $forum_id), 'limit' => 30);
		$this->recursive				= 0;
	
		$data = $this->ForumThread->paginate(array('conditions' => array('ForumThread.forum_id' => $forum_id), 'limit' => 30));
		pr($data);
		$this->set('data', $data);
	}
	///////////////////////////////////////////////////////////////////////////
	function thread($forum_id)
	{

	}
}

?>