diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 8b446b1eb1b..79190725c16 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -61,8 +61,13 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { dol_print_error($db); } } elseif ($action == 'updateform') { - $res1 = dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", GETPOST("MAIN_APPLICATION_TITLE", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - $res2 = dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", GETPOST("MAIN_SESSION_TIMEOUT", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + $res1 = 1; $res2 = 1; + if (GETPOSTISSET('MAIN_APPLICATION_TITLE')) { + $res1 = dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", GETPOST("MAIN_APPLICATION_TITLE", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + } + if (GETPOSTISSET('MAIN_SESSION_TIMEOUT')) { + $res2 = dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", GETPOST("MAIN_SESSION_TIMEOUT", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + } if ($res1 && $res2) { setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); } @@ -165,11 +170,11 @@ if (ini_get("session.gc_probability") == 0) { } print ''; print '