mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-01-27 00:33:34 +00:00
PUT Functions: add support for X-WR-CALNAME in uploaded calendars.
This commit is contained in:
parent
8177d41be9
commit
358c069b3e
@ -225,6 +225,13 @@ function import_collection( $ics_content, $user_no, $path, $caldav_context ) {
|
||||
$timezones = $calendar->GetComponents('VTIMEZONE',true);
|
||||
$components = $calendar->GetComponents('VTIMEZONE',false);
|
||||
|
||||
$displayname = $calendar->GetPValue('X-WR-CALNAME');
|
||||
if ( isset($displayname) ) {
|
||||
$sql = 'UPDATE collection SET dav_displayname = ? WHERE dav_name = ?';
|
||||
$qry = new PgQuery( $sql, $displayname, $path );
|
||||
if ( ! $qry->Exec('PUT') ) rollback_on_error( $caldav_context, $user_no, $path );
|
||||
}
|
||||
|
||||
$tz_ids = array();
|
||||
foreach( $timezones AS $k => $tz ) {
|
||||
$tz_ids[$tz->GetPValue('TZID')] = $k;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user