252 public function getFullCalendarObjects($calendarId, $bCalendarData)
254 $calid = (int) $calendarId;
255 $calevents = array();
257 if (!$this->user->rights->agenda->myactions->read) {
261 if ($calid != $this->user->id && (!isset($this->user->rights->agenda->allactions->read) || !$this->user->rights->agenda->allactions->read)) {
265 $sql = $this->getSqlCalEvents($calid);
267 $result = $this->db->query($sql);
270 while ($obj = $this->db->fetch_object($result)) {
271 $calendardata = $this->toVCalendar($calid, $obj);
273 if ($bCalendarData) {
274 $calevents[] = array(
275 'calendardata
' => $calendardata,
276 'uri
' => $obj->id.'-ev-
'.constant('CDAV_URI_KEY
'),
277 'lastmodified
' => strtotime($obj->lastupd),
278 'etag
' => '"'.md5($calendardata).'"',
279 'calendarid
' => $calendarId,
280 'size
' => strlen($calendardata),
281 'component
' => strpos($calendardata, 'BEGIN:VEVENT
') > 0 ? 'vevent
' : 'vtodo
',
284 $calevents[] = array(
285 // 'calendardata
' => $calendardata, not necessary because etag+size are present
286 'uri
' => $obj->id.'-ev-
'.constant('CDAV_URI_KEY
'),
287 'lastmodified
' => strtotime($obj->lastupd),
288 'etag
' => '"'.md5($calendardata).'"',
289 'calendarid
' => $calendarId,
290 'size
' => strlen($calendardata),
291 'component
' => strpos($calendardata, 'BEGIN:VEVENT
') > 0 ? 'vevent
' : 'vtodo
',