#12994 fixed message error in ajax when historical database is down

This commit is contained in:
Daniel Cebrian 2024-03-07 13:55:35 +01:00
parent 1125f64e89
commit c269d4280a
2 changed files with 9 additions and 4 deletions

View File

@ -117,7 +117,10 @@ function mysql_connect_db(
} }
if (mysqli_connect_errno() > 0) { if (mysqli_connect_errno() > 0) {
include 'general/mysqlerr.php'; if ($history === false) {
include 'general/mysqlerr.php';
}
return false; return false;
} }
} }

View File

@ -147,9 +147,11 @@ function db_connect(
// Display the error once even if multiple // Display the error once even if multiple
// connection attempts are made. // connection attempts are made.
$error = 1; $error = 1;
ui_print_error_message( if ($history === false) {
__('Error connecting to database %s at %s.', $db, $host) ui_print_error_message(
); __('Error connecting to database %s at %s.', $db, $host)
);
}
} }
} }