Update Changelog, + CalDAV-related bugfix

This commit is contained in:
Tobias Hößl 2012-07-28 10:58:12 +00:00
parent ca54de9053
commit a11f43472c
4 changed files with 23 additions and 14 deletions

View File

@ -1,7 +1,9 @@
v0.2.0-pre v0.2.0
====== ======
[FEATURE] Multiple private Calendars can be created. [FEATURE] Multiple private Calendars can be created. Each calendar can have its own default color; single events of a calendar can override this setting.
[FEATURE] Support for recurring events. [FEATURE] Support for recurring events.
[FEATURE] ICS files can be imported to and exported from a calendar.
[FEATURE] Notification by e-mail is supported.
[COMPATIBILITY] When creating or updating an event using CalDAV, the etag is returned. [COMPATIBILITY] When creating or updating an event using CalDAV, the etag is returned.
v0.1.1 v0.1.1

View File

@ -34,7 +34,8 @@ class Sabre_CalDAV_Backend_Private extends Sabre_CalDAV_Backend_Common
* @static * @static
* @return string * @return string
*/ */
public static function getBackendTypeName() { public static function getBackendTypeName()
{
return t("Private Events"); return t("Private Events");
} }
@ -166,11 +167,16 @@ class Sabre_CalDAV_Backend_Private extends Sabre_CalDAV_Backend_Common
if (!isset($cal["uri"])) throw new DAVVersionMismatchException(); if (!isset($cal["uri"])) throw new DAVVersionMismatchException();
if (in_array($cal["uri"], $GLOBALS["CALDAV_PRIVATE_SYSTEM_CALENDARS"])) continue; if (in_array($cal["uri"], $GLOBALS["CALDAV_PRIVATE_SYSTEM_CALENDARS"])) continue;
$components = array();
if ($cal["has_vevent"]) $components[] = "VEVENT";
if ($cal["has_vtodo"]) $components[] = "VTODO";
$dat = array( $dat = array(
"id" => $cal["id"], "id" => $cal["id"],
"uri" => $cal["uri"], "uri" => $cal["uri"],
"principaluri" => $principalUri, "principaluri" => $principalUri,
'{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}getctag' => $cal['ctag'] ? $cal['ctag'] : '0', '{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}getctag' => $cal['ctag'] ? $cal['ctag'] : '0',
'{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set' => new Sabre_CalDAV_Property_SupportedCalendarComponentSet($components),
"calendar_class" => "Sabre_CalDAV_Calendar", "calendar_class" => "Sabre_CalDAV_Calendar",
); );
foreach ($this->propertyMap as $key=> $field) $dat[$key] = $cal[$field]; foreach ($this->propertyMap as $key=> $field) $dat[$key] = $cal[$field];
@ -191,7 +197,7 @@ class Sabre_CalDAV_Backend_Private extends Sabre_CalDAV_Backend_Common
* @param string $principalUri * @param string $principalUri
* @param string $calendarUri * @param string $calendarUri
* @param array $properties * @param array $properties
* @throws Sabre_DAV_Exception * @throws Sabre_DAV_Exception|Sabre_DAV_Exception_Conflict
* @return string|void * @return string|void
*/ */
public function createCalendar($principalUri, $calendarUri, array $properties) public function createCalendar($principalUri, $calendarUri, array $properties)
@ -200,7 +206,7 @@ class Sabre_CalDAV_Backend_Private extends Sabre_CalDAV_Backend_Common
$uid = dav_compat_principal2uid($principalUri); $uid = dav_compat_principal2uid($principalUri);
$r = q("SELECT * FROM %s%scalendars WHERE `namespace` = %d AND `namespace_id` = %d AND `uri` = '%s'", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, CALDAV_NAMESPACE_PRIVATE, $uid, dbesc($calendarUri)); $r = q("SELECT * FROM %s%scalendars WHERE `namespace` = %d AND `namespace_id` = %d AND `uri` = '%s'", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, CALDAV_NAMESPACE_PRIVATE, $uid, dbesc($calendarUri));
if (count($r) > 0) throw new Sabre_DAV_Exception("A calendar with this URI already exists"); if (count($r) > 0) throw new Sabre_DAV_Exception_Conflict("A calendar with this URI already exists");
$keys = array("`namespace`", "`namespace_id`", "`ctag`", "`uri`"); $keys = array("`namespace`", "`namespace_id`", "`ctag`", "`uri`");
$vals = array(CALDAV_NAMESPACE_PRIVATE, IntVal($uid), 1, "'" . dbesc($calendarUri) . "'"); $vals = array(CALDAV_NAMESPACE_PRIVATE, IntVal($uid), 1, "'" . dbesc($calendarUri) . "'");

View File

@ -226,6 +226,7 @@ class Sabre_CalDAV_Backend_Friendica extends Sabre_CalDAV_Backend_Virtual
"uri" => $cal["uri"], "uri" => $cal["uri"],
"principaluri" => $principalUri, "principaluri" => $principalUri,
'{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}getctag' => $cal['ctag'] ? $cal['ctag'] : '0', '{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}getctag' => $cal['ctag'] ? $cal['ctag'] : '0',
'{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set' => new Sabre_CalDAV_Property_SupportedCalendarComponentSet(array("VEVENT")),
"calendar_class" => "Sabre_CalDAV_Calendar_Virtual", "calendar_class" => "Sabre_CalDAV_Calendar_Virtual",
); );
foreach ($this->propertyMap as $key=> $field) $dat[$key] = $cal[$field]; foreach ($this->propertyMap as $key=> $field) $dat[$key] = $cal[$field];

View File

@ -67,7 +67,7 @@ function dav_init(&$a)
dav_include_files(); dav_include_files();
if (true) { if (false) {
dbg(true); dbg(true);
error_reporting(E_ALL); error_reporting(E_ALL);
ini_set("display_errors", 1); ini_set("display_errors", 1);