From b8ee729dedffe4957662a30724d03b00e4e75e99 Mon Sep 17 00:00:00 2001 From: Bacca97 Date: Wed, 30 May 2018 10:06:08 +0200 Subject: [PATCH] Bugfix su segmenti --- modules/segmenti/actions.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/segmenti/actions.php b/modules/segmenti/actions.php index 3414ad9ce..e23ad32d0 100644 --- a/modules/segmenti/actions.php +++ b/modules/segmenti/actions.php @@ -15,13 +15,13 @@ switch (post('op')) { $dbo->query('UPDATE zz_segments SET predefined = 0 WHERE id_module = '.prepare($id_module)); } - $dbo->update('an_anagrafiche', [ + $dbo->update('zz_segments', [ 'id_module' => post('module'), 'name' => post('name'), 'clause' => post('clause'), 'pattern' => $pattern, 'note' => post('note'), - 'position' => post('pisition'), + 'position' => post('position'), 'predefined' => $predefined, ], ['id' => $id_record]); @@ -32,8 +32,10 @@ switch (post('op')) { case 'add': $pattern = str_contains(post('pattern'), '#') ? post('pattern') : '####'; $predefined = post('predefined'); + + $module = post('module'); - if (empty(Modules::getSegments($id_module))) { + if (empty(Modules::getSegments($module))) { $predefined = 1; }