Changeset 12857

Show
Ignore:
Timestamp:
10/17/07 15:30:33 (1 year ago)
Author:
bergie
Message:

Bulletproofing

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.admin.user/plugin.php

    r12849 r12857  
    9999            ), 
    100100            /** 
     101             * List folders group has privileges to 
     102             *  
     103             * Match /user-editor/group/folders/<guid>/ 
     104             */ 
     105            'group_folders' => array 
     106            ( 
     107                'handler' => array ('midcom_admin_user_handler_group_permissions', 'folders'), 
     108                'fixed_args' => array ('group', 'folders'), 
     109                'variable_args' => 1, 
     110            ), 
     111            /** 
    101112                 * Create new user 
    102113                 * 
  • trunk/midcom/midgard.admin.asgard/reflector_tree.php

    r11131 r12857  
    455455     * @access private 
    456456     */ 
    457     function &_child_objects_type_qb(&$schema_type, &$for_object, &$deleted) 
     457    function _child_objects_type_qb(&$schema_type, &$for_object, &$deleted) 
    458458    { 
    459459        debug_push_class(__CLASS__, __FUNCTION__); 
     
    523523            $uptype = $ref->get_midgard_type($upfield); 
    524524            $uptarget = $ref->get_link_target($upfield); 
     525            if (!isset($for_object->$uptarget)) 
     526            { 
     527                $qb->end_group(); 
     528                return false; 
     529            } 
    525530            switch ($uptype) 
    526531            { 
     
    536541                    debug_add("Do not know how to handle upfield '{$upfield}' has type {$uptype}", MIDCOM_LOG_ERROR); 
    537542                    debug_pop(); 
     543                    $qb->end_group(); 
    538544                    return false; 
    539545            } 
     
    552558                case MGD_TYPE_INT: 
    553559                case MGD_TYPE_UINT: 
    554                     $qb->add_constraint($parentfield, '=', (int)$for_object->$parenttarget); 
     560                        $qb->add_constraint($parentfield, '=', (int)$for_object->$parenttarget); 
    555561                    break; 
    556562                default: 
    557563                    debug_add("Do not know how to handle parentfield '{$parentfield}' has type {$parenttype}", MIDCOM_LOG_ERROR); 
    558564                    debug_pop(); 
     565                    $qb->end_group(); 
    559566                    return false; 
    560567            }