Hi! I used hack for findAllThreaded function from this group - I
replaced cake's function with:

function findAllThreaded($root = null, $conditions = null, $fields =
null, $sort = null) {
        return $this->__doThread(Model::findAll($conditions, $fields,
$sort), $root);
}

I need this function to display posts on a forum:
//forums_controller.php:
function topic($id) {
     $this->set('posts',$this->Post->findAllThreaded());
}

The problem is - when I supply root's ID ( $this->Post-
>findAllThreaded($id)) , function doesn't find any children. If I
leave $this->Post->findAllThreaded() with no root ID specified - it
finds all children.
If I specify fields I want to find, for example:
$this->Post-
>findAllThreaded('','','Post.id,Post.parent_id,Post.title'));
it finds nothing and returns empty array.

What is wrong?
Thanks in advance!


PS. Maybe someone knows any FORUM TUTORIAL for cakephp? It's a bit
time consuming to write it all by myself.. Cheers!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to