You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/API/App/v1/AllegatiInterventi.php
+18-6Lines changed: 18 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ public function getCleanupData($last_sync_at)
36
36
// Elenco allegati degli interventi da rimuovere
37
37
$da_interventi = [];
38
38
if (!empty($interventi)) {
39
-
$query = 'SELECT `zz_files`.`id` FROM `zz_files` WHERE `id_module` = (SELECT `id_record` FROM `zz_modules_lang` WHERE `title` = "Interventi" AND `id_lang` = '.prepare(\Models\Locale::getDefault()->id).') AND `id_record` IN ('.implode(',', $interventi).')';
39
+
$query = 'SELECT `zz_files`.`id` FROM `zz_files` WHERE `id_module` = (SELECT `id` FROM `zz_modules` WHERE `name` = "Interventi") AND `id_record` IN ('.implode(',', $interventi).')';
@@ -58,7 +58,7 @@ public function getModifiedRecords($last_sync_at)
58
58
}
59
59
60
60
$id_interventi = array_keys($interventi);
61
-
$query = 'SELECT `zz_files`.`id`, `zz_files`.`updated_at` FROM `zz_files` WHERE `id_module` = (SELECT `id_record` FROM `zz_modules_lang` WHERE `title` = "Interventi" AND `id_lang` = '.prepare(\Models\Locale::getDefault()->id).') AND `id_record` IN ('.implode(',', $id_interventi).')';
61
+
$query = 'SELECT `zz_files`.`id`, `zz_files`.`updated_at` FROM `zz_files` WHERE `id_module` = (SELECT `id` FROM `zz_modules` WHERE `name` = "Interventi") AND `id_record` IN ('.implode(',', $id_interventi).')';
62
62
63
63
// Filtro per data
64
64
if ($last_sync_at) {
@@ -90,21 +90,33 @@ public function retrieveRecord($id)
0 commit comments