Changeset 26274


Ignore:
Timestamp:
06/03/10 16:02:26 (7 years ago)
Author:
bergie
Message:

We need to populate the parentfield before creating, fixes #1841

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ragnaroek/midcom/net.nemein.reservations/handler/create.php

    r25319 r26274  
    131131        $this->_resource = new org_openpsa_calendar_resource_dba();
    132132        $this->_resource->type = $this->_schema;
     133       
     134        // Set up default owner, as the resource cannot be created otherwise
     135        if ($_MIDCOM->auth->user)
     136        {
     137            $person = $_MIDCOM->auth->user->get_storage();
     138            $this->_resource->owner = $person->id;
     139        }
    133140
    134141        if (! $this->_resource->create())
Note: See TracChangeset for help on using the changeset viewer.