| @@ -122,8 +122,9 @@ | ||
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | $addNotif = []; |
| 125 | 125 | |
| 126 | + // Email sent with the cron report | |
| 126 | 127 | if (empty($notifications['acy_report'])) { |
| 127 | 128 | $addNotif[] = [ |
| 128 | 129 | 'name' => 'acy_report', |
| 129 | 130 | 'subject' => 'AcyMailing Cron Report {mainreport}', |
| @@ -130,8 +131,9 @@ | ||
| 130 | 131 | 'content' => '<p>{report}</p><p>{detailreport}</p>', |
| 131 | 132 | ]; |
| 132 | 133 | } |
| 133 | 134 | |
| 135 | + // Confirmation email for double opt-in | |
| 134 | 136 | if (empty($notifications['acy_confirm'])) { |
| 135 | 137 | $addNotif[] = [ |
| 136 | 138 | 'name' => 'acy_confirm', |
| 137 | 139 | 'subject' => '{subscriber:name|ucfirst}, {trans:ACYM_PLEASE_CONFIRM_SUBSCRIPTION}', |
| @@ -299,9 +301,9 @@ | ||
| 299 | 301 | $notif->type = $oneNotif['type'] ?? MailClass::TYPE_NOTIFICATION; |
| 300 | 302 | $notif->settings = $oneNotif['settings'] ?? ''; |
| 301 | 303 | $notif->drag_editor = $oneNotif['drag_editor'] ?? 1; |
| 302 | 304 | $notif->creator_id = acym_currentUserId(); |
| 303 | - $notif->creation_date = date('Y-m-d H:i:s', time() - date('Z')); | |
| 305 | + $notif->creation_date = gmdate('Y-m-d H:i:s', time()); | |
| 304 | 306 | $notif->name = $oneNotif['name']; |
| 305 | 307 | $notif->subject = $oneNotif['subject']; |
| 306 | 308 | $notif->body = $oneNotif['content']; |
| 307 | 309 | $notif->thumbnail = $oneNotif['thumbnail'] ?? ''; |
| @@ -355,9 +357,9 @@ | ||
| 355 | 357 | } |
| 356 | 358 | |
| 357 | 359 | $mail = new \stdClass(); |
| 358 | 360 | $mail->name = $oneOverride['name']; |
| 359 | - $mail->creation_date = date('Y-m-d H:i:s', time() - date('Z')); | |
| 361 | + $mail->creation_date = gmdate('Y-m-d H:i:s', time()); | |
| 360 | 362 | $mail->type = MailClass::TYPE_OVERRIDE; |
| 361 | 363 | $mail->subject = $oneOverride['new_subject']; |
| 362 | 364 | $mail->body = $this->getFormatedNotification($oneOverride['new_body']); |
| 363 | 365 | $mail->drag_editor = 1; |
| @@ -445,9 +447,9 @@ | ||
| 445 | 447 | $mailAutomation = new \stdClass(); |
| 446 | 448 | $mailAutomation->type = MailClass::TYPE_AUTOMATION; |
| 447 | 449 | $mailAutomation->drag_editor = 1; |
| 448 | 450 | $mailAutomation->creator_id = acym_currentUserId(); |
| 449 | - $mailAutomation->creation_date = date('Y-m-d H:i:s', time() - date('Z')); | |
| 451 | + $mailAutomation->creation_date = gmdate('Y-m-d H:i:s', time()); | |
| 450 | 452 | $mailAutomation->name = acym_translation($info[$title]->emailTitle); |
| 451 | 453 | $mailAutomation->subject = acym_translation($info[$title]->emailSubject); |
| 452 | 454 | $mailAutomation->body = $this->getFormatedNotification($info[$title]->emailContent); |
| 453 | 455 | |
| @@ -465,9 +467,9 @@ | ||
| 465 | 467 | } |
| 466 | 468 | |
| 467 | 469 | private function getDTextDisplay(string $dtext, string $preview): string |
| 468 | 470 | { |
| 469 | - $display = '<span class="acym_dynamic mceNonEditable" contenteditable="false" data-dynamic="'.acym_escape($dtext).'" data-mce-selected="1">'; | |
| 471 | + $display = '<span class="acym_dynamic mceNonEditable" contenteditable="false" data-dynamic="'.esc_attr($dtext).'" data-mce-selected="1">'; | |
| 470 | 472 | $display .= $preview; |
| 471 | 473 | $display .= '<em class="acym_remove_dynamic acymicon-close">‍</em>'; |
| 472 | 474 | $display .= '</span>'; |
| 473 | 475 | |