* support multiget report on url with uid, as lightning uses multiget after a PUT on the PUT url, which is the uid

This commit is contained in:
Ralf Becker 2010-11-08 09:25:58 +00:00
parent 33a0f786bd
commit 0571fc21e0

View File

@ -354,7 +354,16 @@ error_log(__METHOD__."($path,,".array2string($start).") filter=".array2string($f
if ($option['name'] == 'href') if ($option['name'] == 'href')
{ {
$parts = explode('/',$option['data']); $parts = explode('/',$option['data']);
if (is_numeric($id = basename(array_pop($parts),'.ics'))) $ids[] = $id; if (!($id = basename(array_pop($parts),'.ics'))) continue;
if (is_numeric($id))
{
$ids[] = $id;
}
else // eg. lightning uses multiget after a PUT on the PUT url, which is the uid
{
$cal_filters['query']['cal_uid'][] = $id;
}
} }
} }
} }
@ -363,7 +372,7 @@ error_log(__METHOD__."($path,,".array2string($start).") filter=".array2string($f
$cal_filters['query'][] = 'egw_cal.cal_id IN ('.implode(',',array_map(create_function('$n','return (int)$n;'),$ids)).')'; $cal_filters['query'][] = 'egw_cal.cal_id IN ('.implode(',',array_map(create_function('$n','return (int)$n;'),$ids)).')';
} }
if ($this->debug > 1) error_log(__FILE__ . __METHOD__ ."($options[path],...,$id) calendar-multiget: ids=".implode(',',$ids)); if ($this->debug > 1) error_log(__FILE__ . __METHOD__ ."($options[path],...,$id) calendar-multiget: ids=".implode(',',$ids).', cal_filters='.array2string($cal_filters));
} }
return true; return true;
} }