From cfdf6b073bc87cf22b470ecbb873a5b1df1fd92a Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sat, 9 Dec 2006 22:04:39 +1300 Subject: [PATCH] Add support for creationdate property. --- inc/caldav-PROPFIND.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/caldav-PROPFIND.php b/inc/caldav-PROPFIND.php index dded953a..fb5eca67 100644 --- a/inc/caldav-PROPFIND.php +++ b/inc/caldav-PROPFIND.php @@ -106,6 +106,9 @@ function collection_to_xml( $collection ) { // $prop->NewElement("getcontenttype", "text/calendar" ); $prop->NewElement("getcontenttype", "httpd/unix-directory" ); } + if ( isset($attribute_list['CREATIONDATE']) ) { + $prop->NewElement("creationdate", $collection->created ); + } if ( isset($attribute_list['RESOURCETYPE']) ) { $prop->NewElement("resourcetype", $resourcetypes ); } @@ -174,6 +177,9 @@ function item_to_xml( $item ) { if ( isset($attribute_list['GETCONTENTTYPE']) ) { $prop->NewElement("getcontenttype", "text/calendar" ); } + if ( isset($attribute_list['CREATIONDATE']) ) { + $prop->NewElement("creationdate", $item->created ); + } if ( isset($attribute_list['RESOURCETYPE']) ) { $prop->NewElement("resourcetype", new XMLElement("calendar", false, array("xmlns" => "urn:ietf:params:xml:ns:caldav")) ); }