diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index 8cd33f7b..d728743c 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -220,6 +220,16 @@ class CalDAVRequest return $this->depth; } + /** + * Returns the tail of a Regex appropriate for this Depth, when appended to + * + */ + function DepthRegexTail( ) { + if ( $this->IsInfiniteDepth() ) return ''; + if ( $this->depth == 0 ) return '$'; + return '[^/]*/?$'; + } + /** * Returns the locked row, either from the cache or from the database *