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. 13
      main/inc/lib/agenda.lib.php

@ -1201,10 +1201,14 @@ 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( $this->updateAttachment(
$attachmentItem['id'], $attachmentItem['id'],
$id, $id,
@ -1212,6 +1216,7 @@ class Agenda
$attachmentCommentList[$counter], $attachmentCommentList[$counter],
$this->course $this->course
); );
}
$counter++; $counter++;
} }
} }

Loading…
Cancel
Save