Commit 19730545 authored by webchick's avatar webchick
Browse files

Issue #2061967 by Maxis, sergeypavlenko, m1r1k: Remove calls to deprecated...

Issue #2061967 by Maxis, sergeypavlenko, m1r1k: Remove calls to deprecated global  in overlay module.
parent d009160c
...@@ -72,7 +72,7 @@ public function onRequest(GetResponseEvent $event) { ...@@ -72,7 +72,7 @@ public function onRequest(GetResponseEvent $event) {
// Only act on html pages. // Only act on html pages.
return; return;
} }
global $user; $user = \Drupal::currentUser();
$mode = overlay_get_mode(); $mode = overlay_get_mode();
......
...@@ -216,7 +216,7 @@ function overlay_page_alter(&$page) { ...@@ -216,7 +216,7 @@ function overlay_page_alter(&$page) {
* @see http://drupal.org/node/890284 * @see http://drupal.org/node/890284
*/ */
function overlay_disable_message() { function overlay_disable_message() {
global $user; $user = \Drupal::currentUser();
$build = array(); $build = array();
if ($user->isAnonymous() || !$user->hasPermission('access overlay')) { if ($user->isAnonymous() || !$user->hasPermission('access overlay')) {
......
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