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
......@@ -1335,7 +1335,12 @@ function _menu_site_is_offline() {
}
}
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment