Commit df49a070 authored by Crell's avatar Crell
Browse files

Switch to using the new system path rathe than ['q'].

parent ef0a9e62
......@@ -3800,7 +3800,7 @@ function _menu_site_is_offline($check_only = FALSE) {
// Ensure that the maintenance mode message is displayed only once
// (allowing for page redirects) and specifically suppress its display on
// the maintenance mode settings page.
if (!$check_only && $_GET['q'] != 'admin/config/development/maintenance') {
if (!$check_only && request()->attributes->get('system_path') != '/admin/config/development/maintenance') {
if (user_access('administer site configuration')) {
drupal_set_message(t('Operating in maintenance mode. <a href="@url">Go online.</a>', array('@url' => url('admin/config/development/maintenance'))), 'status', FALSE);
}
......
......@@ -31,7 +31,7 @@ public function onKernelRequestMaintenanceModeCheck(GetResponseEvent $event) {
// that would not change the global variable. hook_url_inbound_alter() can
// be used to change the path. Code later will not use the $read_only_path
// variable.
$read_only_path = !empty($path) ? $path : $_GET['q'];
$read_only_path = !empty($path) ? $path : $event->getRequest()->attributes->get('system_path');
drupal_alter('menu_site_status', $page_callback_result, $read_only_path);
// Only continue if the site is online.
......
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