Calendar: Fix failing attachment upload in Calendar::editEvent()

Author: @TheTomcat14
pull/4737/head
TheTomcat14 2 years ago committed by GitHub
parent d17ec703c2
commit 39219c5fa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      main/inc/lib/agenda.lib.php

@ -1201,17 +1201,22 @@ class Agenda
if (isset($attachmentArray) && !empty($attachmentArray)) { if (isset($attachmentArray) && !empty($attachmentArray)) {
$counter = 0; $counter = 0;
foreach ($attachmentArray as $attachmentItem) { foreach ($attachmentArray as $attachmentItem) {
if (empty($attachmentItems['id'])) { if (empty($attachmentItem['id'])) {
continue; $this->addAttachment(
$id,
$attachmentItem,
$attachmentCommentList[$counter],
$this->course
);
} else {
$this->updateAttachment(
$attachmentItem['id'],
$id,
$attachmentItem,
$attachmentCommentList[$counter],
$this->course
);
} }
$this->updateAttachment(
$attachmentItem['id'],
$id,
$attachmentItem,
$attachmentCommentList[$counter],
$this->course
);
$counter++; $counter++;
} }
} }

Loading…
Cancel
Save