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