mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-03-02 06:14:17 +00:00
Add a GetTodoByUid( $uid, $relative_url = '') method.
This commit is contained in:
parent
f68823a5b2
commit
631dbc67c3
@ -948,6 +948,34 @@ EOFILTER;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the calendar entry by UID
|
||||
*
|
||||
* @param uid
|
||||
* @param string $relative_url The URL relative to the base_url specified when the calendar was opened. Default ''.
|
||||
*
|
||||
* @return array An array of the relative URL, etag, and calendar data returned from DoCalendarQuery() @see DoCalendarQuery()
|
||||
*/
|
||||
function GetTodoByUid( $uid, $relative_url = '' ) {
|
||||
$filter = "";
|
||||
if ( $uid ) {
|
||||
$filter = <<<EOFILTER
|
||||
<C:filter>
|
||||
<C:comp-filter name="VCALENDAR">
|
||||
<C:comp-filter name="VTODO">
|
||||
<C:prop-filter name="UID">
|
||||
<C:text-match icollation="i;octet">$uid</C:text-match>
|
||||
</C:prop-filter>
|
||||
</C:comp-filter>
|
||||
</C:comp-filter>
|
||||
</C:filter>
|
||||
EOFILTER;
|
||||
}
|
||||
|
||||
return $this->DoCalendarQuery($filter, $relative_url);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the calendar entry by HREF
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user