$action = ''; } else { setEventMessage($price_globals->error, 'errors'); } } //Updaters actions if ($action == 'create_updater' || $action == 'edit_updater') { $price_updaters->type = isset($_POST['type']) ? GETPOST('type', 'int') : $price_updaters->type; $price_updaters->description = isset($_POST['description']) ? GETPOST('description', 'alpha') : $price_updaters->description; $price_updaters->parameters = isset($_POST['parameters']) ? GETPOST('parameters') : $price_updaters->parameters; $price_updaters->fk_variable = isset($_POST['fk_variable']) ? GETPOST('fk_variable', 'int') : $price_updaters->fk_variable; $price_updaters->update_interval = isset($_POST['update_interval']) ? GETPOST('update_interval', 'int') : $price_updaters->update_interval; } if ($action == 'create_updater' && !empty($save)) { //Verify if process() works $res = $price_updaters->process(); if ($res > 0) { $res = $price_updaters->create($user); } if ($res > 0) { $action = ''; } else { setEventMessage($price_updaters->error, 'errors'); } } elseif ($action == 'edit_updater' && !empty($save)) { //Verify if process() works $res = $price_updaters->process(); if ($res > 0) { $res = $price_updaters->update($user); } if ($res > 0) {