Fix duplicazione template email

This commit is contained in:
pek5892 2024-05-21 10:48:53 +02:00
parent 5d1e77472d
commit 38fd2e7f2e
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ switch (post('op')) {
$database->query('ALTER TABLE `tmp_lang` DROP `id_record`');
$database->query('INSERT INTO `em_templates` SELECT NULL,tmp. * FROM tmp');
$id_record = $database->lastInsertedID();
$database->query('INSERT INTO `em_templates_lang` SELECT NULL, id_lang, '.$id_record.',name, subject, body FROM tmp_lang');
$database->query('INSERT INTO `em_templates_lang` SELECT NULL, `id_lang`, '.$id_record.', `title`, `subject`, `body`, NULL, NULL FROM tmp_lang');
$database->query('DROP TEMPORARY TABLE tmp');
$database->query('DROP TEMPORARY TABLE tmp_lang');
$database->query('UPDATE `em_templates_lang` SET `title` = CONCAT (`title`, " (copia)") WHERE id_record = '.prepare($id_record));