Skip to content
Snippets Groups Projects
Commit d87aa9e4 authored by Steven Wittens's avatar Steven Wittens
Browse files

#56796: Don't show offline notice more than once per page

parent c81fd0de
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -1335,7 +1335,12 @@ function _menu_site_is_offline() { ...@@ -1335,7 +1335,12 @@ function _menu_site_is_offline() {
} }
} }
else { else {
drupal_set_message(t('Operating in off-line mode.')); $offline_message = t('Operating in off-line mode.');
$messages = drupal_set_message();
// Ensure that the off-line message is displayed only once [allowing for page redirects].
if (!isset($messages) || !isset($messages['status']) || !in_array($offline_message, $messages['status'])) {
drupal_set_message($offline_message);
}
} }
} }
return FALSE; return FALSE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment