Changeset 16536

Show
Ignore:
Timestamp:
06/05/08 10:06:48 (4 months ago)
Author:
adrenalin
Message:

Prevent temporary objects from failing in lock check

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.helper.datamanager2/controller.php

    r16514 r16536  
    254254    function display_form() 
    255255    { 
    256         // Get the metadata object 
    257         $metadata = $this->datamanager->storage->object->get_metadata(); 
    258          
    259         if ($metadata->is_locked()) 
    260         { 
    261             $this->show_unlock(); 
    262             return; 
     256        // Prevent temporary objects from failing 
     257        if (   isset($this->datamanager->storage) 
     258            && isset($this->datamanager->storage->object) 
     259            && isset($this->datamanager->storage->object->guid)) 
     260        { 
     261            // Get the metadata object 
     262            $metadata = $this->datamanager->storage->object->get_metadata(); 
     263             
     264            if ($metadata->is_locked()) 
     265            { 
     266                $this->show_unlock(); 
     267                return; 
     268            } 
    263269        } 
    264270