mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-18 01:31:21 +00:00
Add support for calendar-free-busy-set, even if it is no longer in the draft.
This commit is contained in:
parent
d75bca52f0
commit
5c036c8d4e
@ -131,17 +131,7 @@ class CalDAVPrincipal
|
|||||||
|
|
||||||
$this->by_email = false;
|
$this->by_email = false;
|
||||||
$this->url = ConstructURL( "/".$this->username."/" );
|
$this->url = ConstructURL( "/".$this->username."/" );
|
||||||
// $this->url = ConstructURL( "/__uuids__/" . $this->username . "/" );
|
|
||||||
|
|
||||||
// $qry = new PgQuery("SELECT dav_name FROM collection WHERE user_no = ?", $this->user_no);
|
|
||||||
// // Should be only one record, but this might change in future.
|
|
||||||
// $qry = new PgQuery("SELECT DISTINCT parent_container FROM collection WHERE user_no = ?", $this->user_no);
|
|
||||||
// $this->calendar_home_set = array();
|
|
||||||
// if( $qry->Exec("CalDAVPrincipal",__LINE__,__FILE__) && $qry->rows > 0 ) {
|
|
||||||
// while( $calendar = $qry->Fetch() ) {
|
|
||||||
// $this->calendar_home_set[] = ConstructURL($calendar->dav_name);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
$this->calendar_home_set = array( $this->url );
|
$this->calendar_home_set = array( $this->url );
|
||||||
|
|
||||||
$this->user_address_set = array(
|
$this->user_address_set = array(
|
||||||
@ -171,6 +161,18 @@ class CalDAVPrincipal
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* calendar-free-busy-set has been dropped from draft 5 of the scheduling extensions for CalDAV
|
||||||
|
* but we'll keep replying to it for a while longer since iCal appears to want it...
|
||||||
|
*/
|
||||||
|
$qry = new PgQuery("SELECT dav_name FROM collection WHERE user_no = ? AND is_calendar", $this->user_no);
|
||||||
|
$this->calendar_free_busy_set = array();
|
||||||
|
if( $qry->Exec("CalDAVPrincipal",__LINE__,__FILE__) && $qry->rows > 0 ) {
|
||||||
|
while( $calendar = $qry->Fetch() ) {
|
||||||
|
$this->calendar_free_busy_set[] = ConstructURL($calendar->dav_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dbg_error_log( "principal", "User: %s (%d) URL: %s, Home: %s, By Email: %d", $this->username, $this->user_no, $this->url, $this->calendar_home_set, $this->by_email );
|
dbg_error_log( "principal", "User: %s (%d) URL: %s, Home: %s, By Email: %d", $this->username, $this->user_no, $this->url, $this->calendar_home_set, $this->by_email );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user