From cf9b0d63ed32b68a2a07fd03a77af0531c752db7 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 16 Sep 2011 17:53:59 -0400 Subject: [PATCH] - Patch #1273206 by droplet: access global when it essentially needed. --- modules/node/node.module | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/node/node.module b/modules/node/node.module index 58604264e97e..30e95591726f 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -2833,8 +2833,6 @@ function node_search_validate($form, &$form_state) { * TRUE if the operation may be performed, FALSE otherwise. */ function node_access($op, $node, $account = NULL) { - global $user; - $rights = &drupal_static(__FUNCTION__, array()); if (!$node || !in_array($op, array('view', 'update', 'delete', 'create'), TRUE)) { @@ -2844,7 +2842,7 @@ function node_access($op, $node, $account = NULL) { } // If no user object is supplied, the access check is for the current user. if (empty($account)) { - $account = $user; + $account = $GLOBALS['user']; } // $node may be either an object or a node type. Since node types cannot be