Fix auto-incrementing the sequence value of xcal objects

This commit is contained in:
Thomas Bruederli 2014-07-31 12:22:07 +02:00
parent 457195102e
commit 0d8b6912ae
4 changed files with 6 additions and 5 deletions

View file

@ -26,7 +26,7 @@ class kolab_format_event extends kolab_format_xcal
{
public $CTYPEv2 = 'application/x-vnd.kolab.event';
public static $scheduling_properties = array('start', 'end', 'allday', 'location', 'status', 'cancelled');
public $scheduling_properties = array('start', 'end', 'allday', 'location', 'status', 'cancelled');
protected $objclass = 'Event';
protected $read_func = 'readEvent';

View file

@ -26,7 +26,7 @@ class kolab_format_task extends kolab_format_xcal
{
public $CTYPEv2 = 'application/x-vnd.kolab.task';
public static $scheduling_properties = array('start', 'due', 'summary', 'status');
public $scheduling_properties = array('start', 'due', 'summary', 'status');
protected $objclass = 'Todo';
protected $read_func = 'readTodo';

View file

@ -29,7 +29,8 @@ abstract class kolab_format_xcal extends kolab_format
public $CTYPE = 'application/calendar+xml';
public static $fulltext_cols = array('title', 'description', 'location', 'attendees:name', 'attendees:email', 'categories');
public static $scheduling_properties = array('start', 'end', 'location');
public $scheduling_properties = array('start', 'end', 'location');
protected $sensitivity_map = array(
'public' => kolabformat::ClassPublic,
@ -315,7 +316,7 @@ abstract class kolab_format_xcal extends kolab_format
// increment sequence when updating properties relevant for scheduling.
// RFC 5545: "It is incremented [...] each time the Organizer makes a significant revision to the calendar component."
// TODO: make the list of properties considered 'significant' for scheduling configurable
foreach (self::$scheduling_properties as $prop) {
foreach ($this->scheduling_properties as $prop) {
$a = $old[$prop];
$b = $object[$prop];
if ($object['allday'] && ($prop == 'start' || $prop == 'end') && $a instanceof DateTime && $b instanceof DateTime) {

View file

@ -904,7 +904,7 @@ class tasklist_kolab_driver extends tasklist_driver
$object['_owner'] = $identity['email'];
unset($object['tempid'], $object['raw'], $object['list'], $object['flagged'], $object['tags']);
unset($object['tempid'], $object['raw'], $object['list'], $object['flagged'], $object['tags'], $object['sequence']);
return $object;
}