user["uid"]; $x = explode("-", $calendarId); $ret = array(); $objs = FriendicaVirtualCalSourceBackend::getItemsByTime($user_id, $x[1]); foreach ($objs as $obj) { $ret[] = array( "id" => IntVal($obj["data_uri"]), "calendardata" => $obj["ical"], "uri" => $obj["data_uri"], "lastmodified" => $obj["date"], "calendarid" => $calendarId, "etag" => $obj["ical_etag"], "size" => IntVal($obj["ical_size"]), ); } return $ret; } /** * Returns information from a single calendar object, based on it's object * uri. * * The returned array must have the same keys as getCalendarObjects. The * 'calendardata' object is required here though, while it's not required * for getCalendarObjects. * * @param string $calendarId * @param string $objectUri * @throws Sabre_DAV_Exception_FileNotFound * @return array */ function getCalendarObject($calendarId, $objectUri) { $a = get_app(); $user_id = $a->user["uid"]; $obj = FriendicaVirtualCalSourceBackend::getItemsByUri($user_id, $objectUri); return array( "id" => IntVal($obj["data_uri"]), "calendardata" => $obj["ical"], "uri" => $obj["data_uri"], "lastmodified" => $obj["date"], "calendarid" => $calendarId, "etag" => $obj["ical_etag"], "size" => IntVal($obj["ical_size"]), ); } /** * Creates a new calendar object. * * @param string $calendarId * @param string $objectUri * @param string $calendarData * @throws Sabre_DAV_Exception_Forbidden * @return null|string|void */ function createCalendarObject($calendarId, $objectUri, $calendarData) { throw new Sabre_DAV_Exception_Forbidden(); } /** * Updates an existing calendarobject, based on it's uri. * * @param string $calendarId * @param string $objectUri * @param string $calendarData * @throws Sabre_DAV_Exception_Forbidden * @return null|string|void */ function updateCalendarObject($calendarId, $objectUri, $calendarData) { throw new Sabre_DAV_Exception_Forbidden(); } /** * Deletes an existing calendar object. * * @param string $calendarId * @param string $objectUri * @throws Sabre_DAV_Exception_Forbidden * @return void */ function deleteCalendarObject($calendarId, $objectUri) { throw new Sabre_DAV_Exception_Forbidden(); } }