Add support for creationdate property.

This commit is contained in:
Andrew McMillan 2006-12-09 22:04:39 +13:00
parent d061c96198
commit cfdf6b073b

View File

@ -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")) );
}