Remove redundant code, this is done in parent's set() method
This commit is contained in:
parent
1913cab8ca
commit
f67c02e185
1 changed files with 2 additions and 7 deletions
|
@ -44,7 +44,8 @@ class kolab_format_configuration extends kolab_format
|
|||
*/
|
||||
public function set(&$object)
|
||||
{
|
||||
$this->init();
|
||||
// set common object properties
|
||||
parent::set($object);
|
||||
|
||||
// read type-specific properties
|
||||
switch ($object['type']) {
|
||||
|
@ -63,12 +64,6 @@ class kolab_format_configuration extends kolab_format
|
|||
return false;
|
||||
}
|
||||
|
||||
// set some automatic values if missing
|
||||
if (!empty($object['uid']))
|
||||
$this->obj->setUid($object['uid']);
|
||||
if (!empty($object['created']))
|
||||
$this->obj->setCreated(self::get_datetime($object['created']));
|
||||
|
||||
// adjust content-type string
|
||||
$this->CTYPE = $this->CTYPEv2 = 'application/x-vnd.kolab.configuration.' . $object['type'];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue