diff --git a/CHANGELOG.md b/CHANGELOG.md index 0baf207d4c..c19a1ac53e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +- Calendar: When events are private but writable. Posting the event with CalDAV will not change the title or description - Files: Detail panel will change to folder when a different folder is selected in the tree. - Core: Fixed checkbox custom field filter to match null values when client sends 'false' - ldapauth: Create postfixadmin account if domain matches serverclient domain diff --git a/www/modules/calendar/model/Event.php b/www/modules/calendar/model/Event.php index 7b34315d50..c74219caaf 100644 --- a/www/modules/calendar/model/Event.php +++ b/www/modules/calendar/model/Event.php @@ -1761,10 +1761,20 @@ public function importVObject(Sabre\VObject\Component $vobject, $attributes=arra $uid = (string) $vobject->uid; if(!empty($uid)) $this->uuid = $uid; - - $this->name = (string) $vobject->summary; - if(empty($this->name)) - $this->name = \GO::t("Unnamed"); + + if(!$this->isPrivate() || $this->user_id === go()->getUserId()) { + $this->name = (string)$vobject->summary; + if (empty($this->name)) + $this->name = \GO::t("Unnamed"); + + if ($vobject->description) + $this->description = (string)$vobject->description; + } else if(!$this->isNew()) { + // the caldav client is posting the data with name and content removed. + // Put it back into the vobject for the vobject cache. + $vobject->summary = $this->name; + $vobject->description = $this->description; + } $dtstart = $vobject->dtstart ? $vobject->dtstart->getDateTime() : new \DateTime(); $dtend = $vobject->dtend ? $vobject->dtend->getDateTime() : new \DateTime(); @@ -1807,10 +1817,6 @@ public function importVObject(Sabre\VObject\Component $vobject, $attributes=arra } if($this->end_time<=$this->start_time) $this->end_time=$this->start_time+3600; - - - if($vobject->description) - $this->description = (string) $vobject->description; if((string) $vobject->rrule != ""){