From df49a0704ea985aa818e4815ccbfaea8ae7b67d3 Mon Sep 17 00:00:00 2001 From: Larry Garfield Date: Fri, 6 Apr 2012 16:06:30 -0500 Subject: [PATCH] Switch to using the new system path rathe than ['q']. --- core/includes/menu.inc | 2 +- .../Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 511c5d09dfc5..797d6e7cc914 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -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. Go online.', array('@url' => url('admin/config/development/maintenance'))), 'status', FALSE); } diff --git a/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php index ec919bc48406..86bd69644807 100644 --- a/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php @@ -31,7 +31,7 @@ class MaintenanceModeSubscriber implements EventSubscriberInterface { // 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.