Switch to using the new system path rathe than ['q'].
parent
ef0a9e627d
commit
df49a0704e
|
@ -3800,7 +3800,7 @@ function _menu_site_is_offline($check_only = FALSE) {
|
||||||
// Ensure that the maintenance mode message is displayed only once
|
// Ensure that the maintenance mode message is displayed only once
|
||||||
// (allowing for page redirects) and specifically suppress its display on
|
// (allowing for page redirects) and specifically suppress its display on
|
||||||
// the maintenance mode settings page.
|
// 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')) {
|
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);
|
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 @@ class MaintenanceModeSubscriber implements EventSubscriberInterface {
|
||||||
// that would not change the global variable. hook_url_inbound_alter() can
|
// 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
|
// be used to change the path. Code later will not use the $read_only_path
|
||||||
// variable.
|
// 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);
|
drupal_alter('menu_site_status', $page_callback_result, $read_only_path);
|
||||||
|
|
||||||
// Only continue if the site is online.
|
// Only continue if the site is online.
|
||||||
|
|
Loading…
Reference in New Issue