diff --git a/controller.php b/controller.php index e3969aa11..689354c99 100755 --- a/controller.php +++ b/controller.php @@ -93,7 +93,7 @@ echo ' '; -redirectOperation($id_module, isset($id_parent) ? $id_parent : $id_record); +redirectOperation($id_module, !empty($id_parent) ? $id_parent : $id_record); // Interfaccia per la modifica dell'ordine e della visibilità delle colonne (Amministratore) if ($user->is_admin && string_contains($module['option'], '|select|')) { diff --git a/lib/functions.php b/lib/functions.php index f38017402..818ddee02 100755 --- a/lib/functions.php +++ b/lib/functions.php @@ -297,7 +297,7 @@ function slashes($string) */ function isAjaxRequest() { - return Whoops\Util\Misc::isAjaxRequest() && filter('ajax') !== null; + return Whoops\Util\Misc::isAjaxRequest() && filter('ajax') !== null && filter('op') !== ''; } /**