Changeset 17651

Show
Ignore:
Timestamp:
09/22/08 14:22:40 (2 months ago)
Author:
rambo
Message:

we no longer need to support pre 1.8 midgard, remove the old safeties that break things now, refs #290

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/MidCOM_2_8/midcom.core/midcom/baseclasses/core/dbobject.php

    r17309 r17651  
    194194            } 
    195195        } 
    196          
     196 
    197197        if (array_key_exists('created', $object)) 
    198198        { 
    199199            $object->created = time(); 
    200200        } 
    201          
    202         if (   !is_null($_MIDCOM->auth->user) 
    203             && is_object($object->metadata)) 
     201 
     202        /* 
     203        debug_push_class(__CLASS__, __FUNCTION__); 
     204        debug_print_r('$object->metadata before magick', $object->metadata); 
     205        debug_pop(); 
     206        */ 
     207 
     208        if (!is_null($_MIDCOM->auth->user)) 
    204209        { 
    205210            // Default the authors to current user 
    206             if (   isset($object->metadata->authors) 
    207                 && !$object->metadata->authors) 
     211            if (empty($object->metadata->authors)) 
    208212            { 
    209213                $creator = $_MIDCOM->auth->user->_storage->id; 
     
    212216         
    213217            // Default the owner to first group of current user 
    214             if (   isset($object->metadata->owner) 
    215                 && !$object->metadata->owner) 
     218            if (empty($object->metadata->owner)) 
    216219            { 
    217220                $groups = $_MIDCOM->auth->user->list_all_memberships(); 
     
    223226            }       
    224227        } 
    225               
     228 
    226229        // Default the publication time to current date/time 
    227230        if (   is_object($object->metadata) 
    228             && !$object->metadata->published
     231            && empty($object->metadata->published)
    229232        { 
    230233            $object->metadata->published = time(); 
    231234        } 
     235 
     236        /* 
     237        debug_push_class(__CLASS__, __FUNCTION__); 
     238        debug_print_r('$object->metadata after magick', $object->metadata); 
     239        debug_pop(); 
     240        */ 
    232241    } 
    233242