From abf596f7d85a077a3e3dcac271ad4bfa9d35ffc5 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Tue, 6 Oct 2009 14:33:30 +1300 Subject: [PATCH] Add an IsCalendar() method. --- inc/CalDAVRequest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index 123432a0..2d152f09 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -682,6 +682,15 @@ EOSQL; } + /** + * Returns true if the URL referenced by this request points at a calendar collection. + */ + function IsCalendar( ) { + if ( !$this->IsCollection() ) return false; + return $this->collection->is_calendar; + } + + /** * Returns true if the URL referenced by this request points at a principal. */