Changeset 14553

Show
Ignore:
Timestamp:
01/22/08 13:40:06 (11 months ago)
Author:
flack
Message:

fix a problem where articles would be shown at the wrong position in the navigation tree

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.helper.reflector/reflector_tree.php

    r14551 r14553  
    549549            $uptype = $ref->get_midgard_type($upfield); 
    550550            $uptarget = $ref->get_link_target($upfield); 
     551 
    551552            if (!isset($for_object->$uptarget)) 
    552553            { 
     
    585586                case MGD_TYPE_INT: 
    586587                case MGD_TYPE_UINT: 
    587                         $qb->add_constraint($parentfield, '=', (int)$for_object->$parenttarget); 
     588                                $qb->begin_group('AND'); 
     589                                $qb->add_constraint($parentfield, '=', (int)$for_object->$parenttarget); 
     590                                // make sure we don't accidentally find other objects with the same id 
     591                            $qb->add_constraint($parentfield . '.guid', '=', (string) $for_object->guid); 
     592                                                $qb->end_group(); 
    588593                    break; 
    589594                default: 
     
    621626        $qb->add_order($ref->get_label_property()); 
    622627        $objects = $qb->execute(); 
     628 
    623629        return $objects; 
    624630    }