Author: jlehrke
New Revision: 28623
URL: http://www.egroupware.org/viewvc/egroupware?rev=28623&view=rev
Log:
Optimized SyncML memory footprint; fixes various filter issues
Modified:
branches/1.6/calendar/inc/class.calendar_ical.inc.php
branches/1.6/calendar/inc/class.calendar_so.inc.php
branches/1.6/phpgwapi/inc/horde/Horde/SyncML/Sync/TwoWaySync.php
branches/1.6/syncml/calendar/lib/api.php
branches/1.6/syncml/contacts/lib/api.php
branches/1.6/syncml/inc/class.syncml_hooks.inc.php
branches/1.6/syncml/notes/lib/api.php
branches/1.6/syncml/tasks/lib/api.php
Modified: branches/1.6/calendar/inc/class.calendar_ical.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/calendar/inc/class.calendar_ical.inc.php?rev=28623&r1=28622&r2=28623&view=diff
— branches/1.6/calendar/inc/class.calendar_ical.inc.php (original)
+++ branches/1.6/calendar/inc/class.calendar_ical.inc.php Sun Nov 29 21:59:52 2009
@@ -121,6 +121,13 @@
var $uidExtension = false;
/**
-
- user preference: calendar to synchronize with
-
-
- @var int
- */
- var $calendarOwner = 0;
- /**
- user preference: use server timezone for exports to device
-
@var boolean
@@ -147,7 +154,7 @@ -
@var boolean
*/
- var $log = false;
- var $log = true;
var $logfile="/tmp/log-vcal";
@@ -307,7 +314,7 @@
foreach ((array)$event[‘participants’] as $uid => $status)
{
if (!($info = $this->resource_info($uid))) continue;
-
if ($uid == $event['owner']) continue; // Organizer
-
if ($uid == $event['owner'] && $status == 'A') continue; // Organizer // RB: MAILTO href contains only the email-address, NO cn! $attributes['ATTENDEE'][] = $info['email'] ? 'MAILTO:'.$info['email'] : ''; // ROLE={CHAIR|REQ-PARTICIPANT|OPT-PARTICIPANT|NON-PARTICIPANT|X-*}
@@ -1010,6 +1017,7 @@
unset($event_to_store);
$event[‘reference’] = $event_info[‘master_event’][‘id’];
$event[‘category’] = $event_info[‘master_event’][‘category’];
-
$event['owner'] = $event_info['master_event']['owner']; } $event_to_store = $event; // prevent $event from being changed by update method
@@ -1228,6 +1236,14 @@
$deviceInfo[‘tzid’])
{
$this->useServerTZ = ($deviceInfo[‘tzid’] == 1);
-
} -
if (isset($GLOBALS['egw_info']['user']['preferences']['syncml']['calendar_owner'])) -
{ -
$owner = $GLOBALS['egw_info']['user']['preferences']['syncml']['calendar_owner']; -
if (0 < (int)$owner && $this->check_perms(EGW_ACL_EDIT,0,$owner)) -
{ -
$this->calendarOwner = $owner; -
} } if (!isset($this->productManufacturer) || $this->productManufacturer == '' ||
@@ -1571,7 +1587,7 @@
$recurence = $attributes[‘value’];
$type = preg_match(’/FREQ=([^;: ]+)/i’,$recurence,$matches) ? $matches[1] : $recurence[0];
// vCard 2.0 values for all types
-
if (preg_match('/UNTIL=([0-9T]+)/',$recurence,$matches))
-
if (preg_match('/UNTIL=([0-9TZ]+)/',$recurence,$matches)) { $vcardData['recur_enddate'] = $this->vCalendar->_parseDateTime($matches[1]); }
@@ -1841,8 +1857,8 @@
$vcardData[‘category’] = array();
}
break;
-
case 'ORGANIZER': // will be written direct to the event case 'ATTENDEE':
-
case 'ORGANIZER': // will be written direct to the event if (isset($attributes['params']['PARTSTAT'])) { $attributes['params']['STATUS'] = $attributes['params']['PARTSTAT'];
@@ -1902,21 +1918,26 @@
}
//elseif (//$attributes['params']['CUTYPE'] == 'GROUP'
-
elseif (preg_match('/(.*) Group/', $searcharray['n_fn'], $matches) -
&& $status && $status != 'U')
-
elseif (preg_match('/(.*) Group/', $searcharray['n_fn'], $matches)) { if (($uid = $GLOBALS['egw']->accounts->name2id($matches[1], 'account_lid', 'g'))) { //Horde::logMessage("vevent2egw: group participant $uid",
-
// __FILE__, __LINE__, PEAR_LOG_DEBUG); -
$members = $GLOBALS['egw']->accounts->members($uid, true); -
if (in_array($this->user, $members)) -
{ -
//Horde::logMessage("vevent2egw: set status to " . $status, -
// __FILE__, __LINE__, PEAR_LOG_DEBUG); -
$event['participants'][$this->user] = $status; -
} -
}
-
// __FILE__, __LINE__, PEAR_LOG_DEBUG); -
if ($status != 'U') -
{ -
// User tries to reply to the group invitiation -
$members = $GLOBALS['egw']->accounts->members($uid, true); -
if (in_array($this->user, $members)) -
{ -
//Horde::logMessage("vevent2egw: set status to " . $status, -
// __FILE__, __LINE__, PEAR_LOG_DEBUG); -
$event['participants'][$this->user] = $status; -
} -
$status = 'U'; // keep the group -
} -
} -
else continue; // can't find this group } elseif ($attributes['value'] == 'Unknown') {
@@ -1946,13 +1967,9 @@
switch($attributes[‘name’])
{
case ‘ATTENDEE’:
-
if ($status) -
{ -
$event['participants'][$uid] = $status; -
} -
else -
{ -
$event['participants'][$uid] = ($uid == $event['owner'] ? 'A' : 'U');
-
if (!$status) -
{ -
$status = ($uid == $event['owner'] ? 'A' : 'U'); } if (!isset($attributes['params']['ROLE']) || $attributes['params']['ROLE'] != 'ORGANIZER') {
@@ -1962,17 +1979,19 @@
}
case ‘ORGANIZER’:
$hasOrganizer = true;
-
if (is_numeric($uid)) -
{
-
if (is_numeric($uid) && ($uid == $this->calendarOwner || !$this->calendarOwner)) -
{ -
// we can store the ORGANIZER as event owner $event['owner'] = $uid; } else { $event['owner'] = $this->user; }
-
// RalfBecker: this is not allways true, owner can choose to NOT participate in EGroupware -
$event['participants'][$uid] = 'A'; -
break;
-
if (!isset($event['participants'][$uid])) -
{ -
$event['participants'][$uid] = 'A'; -
} } break; case 'CREATED': // will be written direct to the event
@@ -1984,8 +2003,7 @@
}
}
-
if (!$hasOrganizer && $this->productManufacturer == 'groupdav' -
&& !isset($event['participants'][$this->user]))
-
if (!$hasOrganizer && !isset($event['participants'][$this->user])) { // according to iCalendar standard, ORGANIZER not used for events in the own calendar $event['participants'][$this->user] = 'A';
@@ -2059,8 +2077,13 @@
break;
}
}
-
if ($this->calendarOwner) $event['owner'] = $this->calendarOwner; //Horde::logMessage("vevent2egw:\n" . print_r($event, true), // __FILE__, __LINE__, PEAR_LOG_DEBUG); -
if ($this->log) -
{ -
error_log(__FILE__.'['.__LINE__.'] '.__METHOD__."()\n".array2string($event)."\n",3,$this->logfile); -
}} return $event;
@@ -2250,8 +2273,8 @@
$recurrence_event[‘start’] = $event[‘reference’];
$recurrence_event[‘end’] = $event[‘reference’] + ($master_event[‘end’] - $master_event[‘start’]);
// check for changed data
-
foreach (array('start','end','uid','owner','title','description', -
'location','priority','public','special','non_blocking') as $key)
-
foreach (array('start','end','uid','title','location', -
'priority','public','special','non_blocking') as $key) { if (!empty($event[$key]) && $recurrence_event[$key] != $event[$key]) {
Modified: branches/1.6/calendar/inc/class.calendar_so.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/calendar/inc/class.calendar_so.inc.php?rev=28623&r1=28622&r2=28623&view=diff
— branches/1.6/calendar/inc/class.calendar_so.inc.php (original)
+++ branches/1.6/calendar/inc/class.calendar_so.inc.php Sun Nov 29 21:59:52 2009
@@ -892,6 +892,8 @@
*/
function participants($cal_id,$participants,$change_since=0,$add_only=false)
{
-
$recurrences = array(); -
// remove group-invitations, they are NOT stored in the db foreach($participants as $uid => $status) {
@@ -907,8 +909,15 @@
$where[0] = ‘(cal_recur_date=0 OR cal_recur_date >= ‘.(int)$change_since.’)’;
}
-
if ($change_since !== false) // update existing entries -
{
-
if ($change_since !== false) -
{ -
// find all existing recurrences -
foreach($this->db->select($this->user_table,'DISTINCT cal_recur_date',$where,__LINE__,__FILE__,false,'','calendar') as $row) -
{ -
$recurrences[] = $row['cal_recur_date']; -
} -
// update existing entries $existing_entries = $this->db->select($this->user_table,'DISTINCT cal_user_type,cal_user_id',$where,__LINE__,__FILE__,false,'','calendar'); // create a full list of participants which already exist in the db
@@ -956,16 +965,7 @@
if (count($participants)) // participants which need to be added
{
-
// find all recurrences, as they all need the new parts to be added -
$recurrences = array(); -
if ($change_since !== false) // existing entries -
{ -
foreach($this->db->select($this->user_table,'DISTINCT cal_recur_date',$where,__LINE__,__FILE__,false,'','calendar') as $row) -
{ -
$recurrences[] = $row['cal_recur_date']; -
} -
} -
if (!count($recurrences)) $recurrences[] = 0; // insert the default one
-
if (!count($recurrences)) $recurrences[] = 0; // insert the default recurrence // update participants foreach($participants as $uid => $status)
@@ -1075,7 +1075,7 @@
$type = '';
$id = null;
-
$this->split_user($uid,$type,$id);
-
self::split_user($uid,$type,$id); $this->db->insert($this->user_table,array( 'cal_status' => $status !== true ? $status[0] : 'U', 'cal_quantity' => substr($status,1) ? substr($status,1) : 1,
@@ -1270,7 +1270,7 @@
{
$user_type = ‘’;
$user_id = null;
-
$this->split_user($old_user,$user_type,$user_id);
-
self::split_user($old_user,$user_type,$user_id); if ($user_type == 'u') // only accounts can be owners of events {
@@ -1324,14 +1324,24 @@
*
* @param int $cal_id
* @param int $uid participant uid
-
- @param int $start=0 if != 0: startdate of the search/list (servertime)
-
- @param int $end=0 if != 0: enddate of the search/list (servertime)
-
-
@return array recur_date => status pairs (index 0 => main status)
*/
- function get_recurrences($cal_id, $uid)
- function get_recurrences($cal_id, $uid, $start=0, $end=0)
{
$user_type = $user_id = null;
-
$this->split_user($uid, $user_type, $user_id);
-
self::split_user($uid, $user_type, $user_id); $participant_status = array(); $where = array('cal_id' => $cal_id); -
if ($start != 0 && $end == 0) $where[] = '(cal_recur_date = 0 OR cal_recur_date >= ' . (int)$start . ')'; -
if ($start == 0 && $end != 0) $where[] = '(cal_recur_date = 0 OR cal_recur_date <= ' . (int)$end . ')'; -
if ($start != 0 && $end != 0) -
{ -
$where[] = '(cal_recur_date = 0 OR (cal_recur_date >= ' . (int)$start . -
' AND cal_recur_date <= ' . (int)$end . '))'; -
} foreach($this->db->select($this->user_table,'DISTINCT cal_recur_date',$where,__LINE__,__FILE__,false,'','calendar') as $row) { // inititalize the array
@@ -1342,6 +1352,13 @@
‘cal_user_type’ => $user_type ? $user_type : ‘u’,
‘cal_user_id’ => $user_id,
);
-
if ($start != 0 && $end == 0) $where[] = '(cal_recur_date = 0 OR cal_recur_date >= ' . (int)$start . ')'; -
if ($start == 0 && $end != 0) $where[] = '(cal_recur_date = 0 OR cal_recur_date <= ' . (int)$end . ')'; -
if ($start != 0 && $end != 0) -
{ -
$where[] = '(cal_recur_date = 0 OR (cal_recur_date >= ' . (int)$start . -
' AND cal_recur_date <= ' . (int)$end . '))'; -
} foreach ($this->db->select($this->user_table,'cal_recur_date,cal_status',$where, __LINE__,__FILE__,false,'','calendar') as $row) {
@@ -1370,7 +1387,7 @@
foreach ($this->db->select($this->user_table,‘DISTINCT cal_user_type,cal_user_id’, $where,
LINE,FILE,false,’’,‘calendar’) as $row)
{
-
$uid = $this->combine_user($row['cal_user_type'], $row['cal_user_id']);
-
$uid = self::combine_user($row['cal_user_type'], $row['cal_user_id']); $id = $row['cal_user_type'] . $row['cal_user_id']; $participants[$id]['type'] = $row['cal_user_type']; $participants[$id]['id'] = $row['cal_user_id'];
@@ -1411,10 +1428,12 @@
* @param array $event Recurring Event.
* @param int servertime=0 == 0 -> export event with UTC timestamps
* != 0 -> export with servertime timestamps
-
- @param int $start=0 if != 0: startdate of the search/list (servertime)
-
- @param int $end=0 if != 0: enddate of the search/list (servertime)
-
@return array Array of exception days (false for non-recurring events).
*/
- function get_recurrence_exceptions(&$event, $servertime=0)
- function get_recurrence_exceptions(&$event, $servertime=0, $start=0, $end=0)
{
$cal_id = (int) $event[‘id’];
if (!$cal_id || $event[‘recur_type’] == MCAL_RECUR_NONE) return false;
@@ -1431,7 +1450,7 @@
case ‘u’: // account
case ‘c’: // contact
case ‘e’: // email address
-
$recurrences = $this->get_recurrences($event['id'], $uid);
-
$recurrences = $this->get_recurrences($event['id'], $uid, $start, $end); foreach ($recurrences as $recur_date => $recur_status) { if ($recur_date && $recur_status != $recurrences[0])
Modified: branches/1.6/phpgwapi/inc/horde/Horde/SyncML/Sync/TwoWaySync.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/phpgwapi/inc/horde/Horde/SyncML/Sync/TwoWaySync.php?rev=28623&r1=28622&r2=28623&view=diff
— branches/1.6/phpgwapi/inc/horde/Horde/SyncML/Sync/TwoWaySync.php (original)
+++ branches/1.6/phpgwapi/inc/horde/Horde/SyncML/Sync/TwoWaySync.php Sun Nov 29 21:59:52 2009
@@ -423,15 +423,28 @@
‘type’ => $syncType,
‘filter’ => $this->_filterExpression
)));
-
$state->mergeChangedItems($syncType, $registry->call($hordeType . '/listBy', array (
-
$changedItems =& $registry->call($hordeType . '/listBy', array ( 'action' => 'modify', 'timestamp' => $refts, 'type' => $syncType, 'filter' => $this->_filterExpression
-
))); -
Horde :: logMessage("SyncML: reading deleted items from database for $hordeType", -
__FILE__, __LINE__, PEAR_LOG_DEBUG);
-
)); -
$addedItems =& $registry->call($hordeType . '/listBy', array ( -
'action' => 'add', -
'timestamp' => $refts, -
'type' => $syncType, -
'filter' => $this->_filterExpression -
)); -
// added items may show up as changed, too -
$changedItems = array_diff($changedItems, $addedItems); -
$state->mergeChangedItems($syncType, $changedItems); -
$state->mergeAddedItems($syncType, $addedItems); -
$state->setDeletedItems($syncType, $registry->call($hordeType . '/listBy', array ( 'action' => 'delete', 'timestamp' => $refts,
@@ -439,8 +452,6 @@
‘filter’ => $this->_filterExpression
)));
-
Horde :: logMessage("SyncML: reading added items from database for $hordeType", -
__FILE__, __LINE__, PEAR_LOG_DEBUG); /* The items, which now match the filter criteria are show here, too $delta_add = count($registry->call($hordeType . '/listBy', array ( 'action' => 'add',
@@ -449,12 +460,6 @@
‘filter’ => $this->_filterExpression
)));
*/
-
$state->mergeAddedItems($syncType, $registry->call($hordeType . '/listBy', array ( -
'action' => 'add', -
'timestamp' => $refts, -
'type' => $syncType, -
'filter' => $this->_filterExpression -
))); $this->_syncDataLoaded = TRUE;
Modified: branches/1.6/syncml/calendar/lib/api.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/syncml/calendar/lib/api.php?rev=28623&r1=28622&r2=28623&view=diff
— branches/1.6/syncml/calendar/lib/api.php (original)
+++ branches/1.6/syncml/calendar/lib/api.php Sun Nov 29 21:59:52 2009
@@ -69,7 +69,31 @@
$vcal = new Horde_iCalendar;
$boCalendar = new calendar_bo();
- $show_rejected = $GLOBALS[‘egw_info’][‘user’][‘preferences’][‘calendar’][‘show_rejected’];
-
if (isset($GLOBALS[‘egw_info’][‘user’][‘preferences’][‘syncml’][‘calendar_filter’]))
-
{
-
$syncCriteria = $GLOBALS['egw_info']['user']['preferences']['syncml']['calendar_filter'] ? 'all' : ''; -
} else {
-
$syncCriteria = ''; -
}
-
$calendarOwner = $GLOBALS[‘egw_info’][‘user’][‘account_id’];
-
if (isset($GLOBALS[‘egw_info’][‘user’][‘preferences’][‘syncml’][‘calendar_owner’]))
-
{
-
$owner = $GLOBALS['egw_info']['user']['preferences']['syncml']['calendar_owner']; -
foreach($boCalendar->list_cals() as $grant) -
{ -
if ($grant['grantor'] == $owner) -
{ -
$calendarOwner = $owner; -
break; -
} -
} -
}
-
Horde::logMessage(“SymcML: egwcalendarsync calendar owner: $calendarOwner”,
-
__FILE__, __LINE__, PEAR_LOG_DEBUG);$now = time();
@@ -102,10 +126,12 @@
(
‘start’ => date(‘Ymd’, $startDate),
‘end’ => date(‘Ymd’, $endDate),
-
'filter' => $show_rejected ? 'all' : '',
-
'filter' => $syncCriteria, -
'users' => $calendarOwner, 'daywise' => false, 'enum_recuring' => false, 'enum_groups' => true, -
'cols' => array('egw_cal.cal_id', 'cal_start', 'recur_type'),);
$state = &$_SESSION[‘SyncML.state’];
@@ -119,13 +145,15 @@$events =& $boCalendar->search($searchFilter);
- foreach ((array)$events as $event)
- {
-
$guids[] = $guid = 'calendar-' . $event['id'];
- foreach ($events as $event)
- {
-
$guids[] = $guid = 'calendar-' . $event['cal_id']; if ($event['recur_type'] != MCAL_RECUR_NONE) { -
$event['id'] = $event['cal_id']; -
$event['start'] = $event['cal_start']; // Check if the stati for all participants are identical for all recurrences
-
$days = $boCalendar->so->get_recurrence_exceptions(&$event, $tz_id);
-
$days = $boCalendar->so->get_recurrence_exceptions(&$event, $tz_id, $startDate, $endDate); foreach ($days as $recur_date) {
@@ -163,7 +191,7 @@
case ‘delete’ :
// filters may have changed, so we need to calculate which
// items are to delete from client because they are not longer in the list.
-
return $allChangedItems + array_diff($allClientItems, $allReadAbleItems);
-
return array_unique($allChangedItems + array_diff($allClientItems, $allReadAbleItems)); case 'add' : // - added items may not need to be added, cause they are filtered out.
Modified: branches/1.6/syncml/contacts/lib/api.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/syncml/contacts/lib/api.php?rev=28623&r1=28622&r2=28623&view=diff
— branches/1.6/syncml/contacts/lib/api.php (original)
+++ branches/1.6/syncml/contacts/lib/api.php Sun Nov 29 21:59:52 2009
@@ -131,7 +131,7 @@
case ‘delete’ :
// filters may have changed, so we need to calculate which
// items are to delete from client because they are not longer in the list.
-
return $allChangedItems + array_diff($allClientItems, $allReadAbleItems);
-
return array_unique($allChangedItems + array_diff($allClientItems, $allReadAbleItems)); case 'add' : // - added items may not need to be added, cause they are filtered out.
Modified: branches/1.6/syncml/inc/class.syncml_hooks.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/syncml/inc/class.syncml_hooks.inc.php?rev=28623&r1=28622&r2=28623&view=diff
— branches/1.6/syncml/inc/class.syncml_hooks.inc.php (original)
+++ branches/1.6/syncml/inc/class.syncml_hooks.inc.php Sun Nov 29 21:59:52 2009
@@ -31,8 +31,8 @@
);
$selectYesNo = array(
-
0 => lang('no'), -
1 => lang('yes')
-
1 => lang('Yes'), -
0 => lang('No') ); $devices_Entries = array();
@@ -51,6 +51,14 @@
// list the InfoLog filters
$infolog_bo = new infolog_bo();
$show_infolog_filters = $infolog_bo->filters;
+
-
// list the calendars this user has access to -
$calendar_bo = new calendar_bo(); -
$show_calendars = array(); -
foreach($calendar_bo->list_cals() as $grant) -
{ -
$show_calendars[$grant['grantor']] = $grant['name']; -
} // list the calendar categories of this user $categories = new categories($user, 'calendar');
@@ -96,7 +104,7 @@
‘xmlrpc’ => False,
‘admin’ => False
),
-
$me_name => array (
-
$me_name => array( 'type' => 'input', 'label' => 'Max Entries', 'name' => $me_name,
@@ -482,11 +490,11 @@
),
‘calendarhistoryintro’ => array(
‘type’ => ‘subsection’,
-
'title' => '<h3>' . lang('Calendar Synchronization Period') . '</h3>', -
'xmlrpc' => False, -
'admin' => False -
), -
'calendar_past' => array (
-
'title' => '<h3>' . lang('Calendar Synchronization Options') . '</h3>', -
'xmlrpc' => False, -
'admin' => False -
), -
'calendar_past' => array( 'type' => 'input', 'label' => lang('Calendar History Period'), 'name' => 'calendar_past',
@@ -497,7 +505,7 @@
‘xmlrpc’ => True,
‘admin’ => False,
),
-
'calendar_future' => array (
-
'calendar_future' => array( 'type' => 'input', 'label' => lang('Calendar Future Period'), 'name' => 'calendar_future',
@@ -507,6 +515,26 @@
‘default’ => 65000000,
‘xmlrpc’ => True,
‘admin’ => False,
-
), -
'calendar_filter' => array( -
'type' => 'select', -
'label' => 'Synchronize invitations you rejected', -
'name' => 'calendar_filter', -
'help' => lang('Should invitations you rejected still be synchronized to your devices?'), -
'values' => $selectYesNo, -
'default' => 0, -
'xmlrpc' => True, -
'admin' => False, -
), -
'calendar_owner' => array( -
'type' => 'select', -
'label' => 'Syncronization Calendars', -
'name' => 'calendar_owner', -
'help' => lang('Events from all selected Calendars will be synchronized.'), -
'values' => $show_calendars, -
'default' => 'none', -
'xmlrpc' => True, -
'admin' => False, ), 'taskoptionintro' => array( 'type' => 'subsection',
Modified: branches/1.6/syncml/notes/lib/api.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/syncml/notes/lib/api.php?rev=28623&r1=28622&r2=28623&view=diff
— branches/1.6/syncml/notes/lib/api.php (original)
+++ branches/1.6/syncml/notes/lib/api.php Sun Nov 29 21:59:52 2009
@@ -82,6 +82,7 @@
‘col_filter’ => array(
‘info_type’ => ‘note’,
),
-
'col' => array('info_id'),);
$notes =& $boInfolog->search($searchFilter);
@@ -123,7 +124,7 @@
case ‘delete’ :
// filters may have changed, so we need to calculate which
// items are to delete from client because they are not longer in the list.
-
return $allChangedItems + array_diff($allClientItems, $allReadAbleItems);
-
return array_unique($allChangedItems + array_diff($allClientItems, $allReadAbleItems)); case 'add' : // - added items may not need to be added, cause they are filtered out.
Modified: branches/1.6/syncml/tasks/lib/api.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/syncml/tasks/lib/api.php?rev=28623&r1=28622&r2=28623&view=diff
— branches/1.6/syncml/tasks/lib/api.php (original)
+++ branches/1.6/syncml/tasks/lib/api.php Sun Nov 29 21:59:52 2009
@@ -83,6 +83,7 @@
‘col_filter’ => array(
‘info_type’ => ‘task’,
),
-
'col' => array('info_id'),);
$tasks =& $boInfolog->search($searchFilter);
@@ -124,7 +125,7 @@
case ‘delete’ :
// filters may have changed, so we need to calculate which
// items are to delete from client because they are not longer in the list.
-
return $allChangedItems + array_diff($allClientItems, $allReadAbleItems);
-
return array_unique($allChangedItems + array_diff($allClientItems, $allReadAbleItems)); case 'add' : // - added items may not need to be added, cause they are filtered out.
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what’s new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs