[Legacy] Add disable_echos global on legacy

This commit is contained in:
Clemente Raposo 2025-01-14 12:06:37 +00:00 committed by c.raposo
parent b57242108d
commit 35a17d6961

View file

@ -2122,7 +2122,10 @@ function sugar_die($error_message, $exit_code = 1)
{
global $focus;
sugar_cleanup();
if (!empty($GLOBALS['disable_echos'])) {
echo $error_message;
}
throw new Exception($error_message, $exit_code);
}
@ -3760,11 +3763,13 @@ function sugar_cleanup($exit = false)
//this is not an ajax call and the user preference error flag is set, so reset the flag and print js to flash message
$err_mess = $app_strings['ERROR_USER_PREFS'];
$_SESSION['USER_PREFRENCE_ERRORS'] = false;
if (!empty($GLOBALS['disable_echos'])) {
echo "
<script>
ajaxStatus.flashStatus('$err_mess',7000);
</script>";
}
}
pre_login_check();
if (class_exists('DBManagerFactory')) {