mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-09-23 06:39:18 +00:00
Changes to Depth handling.
This commit is contained in:
parent
85017681d0
commit
946e0719ef
@ -230,8 +230,11 @@ class CalDAVRequest
|
|||||||
$this->depth = 'infinity';
|
$this->depth = 'infinity';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'PROPFIND':
|
|
||||||
case 'REPORT':
|
case 'REPORT':
|
||||||
|
$this->depth = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'PROPFIND':
|
||||||
default:
|
default:
|
||||||
$this->depth = 0;
|
$this->depth = 0;
|
||||||
}
|
}
|
||||||
@ -740,8 +743,9 @@ EOSQL;
|
|||||||
* Returns the tail of a Regex appropriate for this Depth, when appended to
|
* Returns the tail of a Regex appropriate for this Depth, when appended to
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function DepthRegexTail() {
|
function DepthRegexTail( $for_collection_report = false) {
|
||||||
if ( $this->IsInfiniteDepth() ) return '';
|
if ( $this->IsInfiniteDepth() ) return '';
|
||||||
|
if ( $this->depth == 0 && $for_collection_report ) return '[^/]+$';
|
||||||
if ( $this->depth == 0 ) return '$';
|
if ( $this->depth == 0 ) return '$';
|
||||||
return '[^/]*/?$';
|
return '[^/]*/?$';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@ $range_end = new RepeatRuleDateTime($fbq_end);
|
|||||||
|
|
||||||
|
|
||||||
/** We use the same code for the REPORT, the POST and the freebusy GET... */
|
/** We use the same code for the REPORT, the POST and the freebusy GET... */
|
||||||
$freebusy = get_freebusy( '^'.$request->path.$request->DepthRegexTail(), $range_start, $range_end );
|
$freebusy = get_freebusy( '^' . $request->path . $request->DepthRegexTail(true), $range_start, $range_end );
|
||||||
|
|
||||||
$result = new iCalComponent();
|
$result = new iCalComponent();
|
||||||
$result->VCalendar();
|
$result->VCalendar();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user