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: modules/categorie/actions.php
+1-6Lines changed: 1 addition & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -143,12 +143,7 @@
143
143
$id = $id_record;
144
144
}
145
145
146
-
$query = 'SELECT * FROM `mg_articoli` WHERE (`id_categoria` = :id OR `id_sottocategoria` = :id OR `id_sottocategoria` IN (SELECT `id` FROM `zz_categorie` WHERE `parent` = :id)) AND `deleted_at` IS NULL';
147
-
$params = [
148
-
':id' => $id,
149
-
];
150
-
151
-
if ($dbo->fetchNum($query, $params) == 0) {
146
+
if ($dbo->fetchNum('SELECT * FROM `mg_articoli` WHERE (`id_categoria`='.prepare($id).' OR `id_sottocategoria`='.prepare($id).' OR `id_sottocategoria` IN (SELECT `id` FROM `zz_categorie` WHERE `parent`='.prepare($id).')) AND `deleted_at` IS NULL') == 0) {
152
147
$dbo->delete('zz_categorie', ['id' => $id]);
153
148
154
149
flash()->info(tr('Tipologia di _TYPE_ eliminata con successo!', [
0 commit comments