1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-22 13:26:38 +01:00

Bugfix su segmenti

This commit is contained in:
Bacca97 2018-05-30 10:06:08 +02:00
parent 465b8d61fa
commit b8ee729ded

View File

@ -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;
}