Commit a10c5938 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #621 in ZP/z-push from bugfix/ZP-1319-caldav-empty-description to develop

* commit 'd82f37d9':
  ZP-1319 Replace tabs with spaces. Released under the Affero GNU General Public License (AGPL) version 3.
  ZP-1319 Caldav empty DESCRIPTION, also check asbody body. Released under the Affero GNU General Public License (AGPL) version 3.
  ZP-1319 Caldav empty DESCRIPTION. Released under the Affero GNU General Public License (AGPL) version 3.
parents 1bf2fc99 d82f37d9
......@@ -1095,11 +1095,14 @@ class BackendCalDAV extends BackendDiff {
$vevent->AddProperty("ORGANIZER", sprintf("MAILTO:%s", $data->originalUsername));
}
}
if (isset($data->body)) {
if (isset($data->body) && strlen($data->body) > 0) {
$vevent->AddProperty("DESCRIPTION", $data->body);
}
if (isset($data->asbody->data)) {
$vevent->AddProperty("DESCRIPTION", stream_get_contents($data->asbody->data));
$asbody = stream_get_contents($data->asbody->data);
if (strlen($asbody) > 0) {
$vevent->AddProperty("DESCRIPTION", $asbody);
}
}
if (isset($data->categories) && is_array($data->categories)) {
$vevent->AddProperty("CATEGORIES", implode(",", $data->categories));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment