Changeset View
Changeset View
Standalone View
Standalone View
plugins/libkolab/lib/kolab_storage_folder.php
Show All 39 Lines | class kolab_storage_folder extends kolab_storage_folder_api | ||||
protected $resource_uri; | protected $resource_uri; | ||||
/** | /** | ||||
* Default constructor | * Default constructor | ||||
* | * | ||||
* @param string The folder name/path | * @param string The folder name/path | ||||
* @param string Expected folder type | * @param string Expected folder type | ||||
* @param string Optional folder type if known | |||||
*/ | */ | ||||
function __construct($name, $type = null, $type_annotation = null) | function __construct($name, $type = null, $type_annotation = null) | ||||
{ | { | ||||
parent::__construct($name); | parent::__construct($name); | ||||
$this->set_folder($name, $type, $type_annotation); | $this->set_folder($name, $type, $type_annotation); | ||||
} | } | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 535 Lines • ▼ Show 20 Lines | class kolab_storage_folder extends kolab_storage_folder_api | ||||
* @param array $object The array that holds the data of the object. | * @param array $object The array that holds the data of the object. | ||||
* @param string $type The type of the kolab object. | * @param string $type The type of the kolab object. | ||||
* @param string $uid The UID of the old object if it existed before | * @param string $uid The UID of the old object if it existed before | ||||
* | * | ||||
* @return mixed False on error or IMAP message UID on success | * @return mixed False on error or IMAP message UID on success | ||||
*/ | */ | ||||
public function save(&$object, $type = null, $uid = null) | public function save(&$object, $type = null, $uid = null) | ||||
{ | { | ||||
if (!$this->valid && empty($object)) { | if (!$this->valid || empty($object)) { | ||||
return false; | return false; | ||||
} | } | ||||
if (!$type) | if (!$type) | ||||
$type = $this->type; | $type = $this->type; | ||||
// copy attachments from old message | // copy attachments from old message | ||||
$copyfrom = $object['_copyfrom'] ?: $object['_msguid']; | $copyfrom = $object['_copyfrom'] ?: $object['_msguid']; | ||||
▲ Show 20 Lines • Show All 560 Lines • Show Last 20 Lines |