Changeset 5820

Show
Ignore:
Timestamp:
04/26/07 10:31:52 (2 years ago)
Author:
bergie
Message:

MgdSchema? is_in_tree doesn't seem to work in 1.8.2

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/midcom.core/midcom/helper/nav.php

    r4901 r5820  
    191191    function is_node_in_tree ($node_id, $root_id)  
    192192    { 
    193         $topic = new midcom_db_topic(); 
    194         return $topic->is_in_tree($root_id, $node_id); 
     193        //$topic = new midcom_db_topic(); 
     194        //return $topic->is_in_tree($root_id, $node_id); 
     195        $qb = midcom_db_topic::new_query_builder(); 
     196        $qb->add_constraint('id', '=', $node_id); 
     197        $qb->add_constraint('up', 'INTREE', $root_id); 
     198        if ($qb->count() > 0) 
     199        { 
     200            return true; 
     201        } 
     202        return false; 
    195203    } 
    196204