Skip to content
Code-Schnipsel Gruppen Projekte

Update 'next-4.x' with latest changes from 'main'

Zusammengeführt QUIQQER Stabilization requested to merge main into next-4.x
1 Datei
+ 18
10
Änderungen vergleichen
  • Nebeneinander
  • In der Reihe
+ 18
10
@@ -48,18 +48,26 @@ function (
!empty($mailAttachmentMediaFileIds) &&
Permission::hasPermission(ERPOutput::PERMISSION_ATTACH_EMAIL_FILES)
) {
$Media = QUI::getRewrite()->getProject()->getMedia();
$mailAttachmentMediaFileIds = json_decode($mailAttachmentMediaFileIds, true);
$Project = QUI::getRewrite()->getProject();
foreach ($mailAttachmentMediaFileIds as $fileId) {
if (empty($fileId)) {
continue;
}
if ($Project) {
$Project = QUI::getProjectManager()->getStandard();
}
if ($Project) {
$Media = $Project->getMedia();
$mailAttachmentMediaFileIds = json_decode($mailAttachmentMediaFileIds, true);
foreach ($mailAttachmentMediaFileIds as $fileId) {
if (empty($fileId)) {
continue;
}
try {
$attachedMediaFiles[] = $Media->get((int)$fileId);
} catch (Exception $Exception) {
QUI\System\Log::writeException($Exception);
try {
$attachedMediaFiles[] = $Media->get((int)$fileId);
} catch (Exception $Exception) {
QUI\System\Log::writeException($Exception);
}
}
}
}
Lade