summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhefox2013-02-17 09:44:51 (GMT)
committer Joachim Noreiko2013-02-17 09:44:51 (GMT)
commit5206b67146f2b429f96a0912819c31adafc491b4 (patch)
tree1fd0b78f559ea876bd40d817a2fd872fc0a6dca8
parent61f80040f017407c6a96d70ba2b14848d9ed19d8 (diff)
Issue #1896854 by hefox: Changed flag_flag_access() to use flag->fetch_content() cache.
-rw-r--r--flag.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/flag.module b/flag.module
index 6a8debc..a1b45ea 100644
--- a/flag.module
+++ b/flag.module
@@ -1353,7 +1353,7 @@ function flag_flag_access($flag, $entity_id, $action, $account) {
if ($flag->entity_type == 'node') {
// For non-existent nodes (such as on the node add form), assume that the
// current user is creating the content.
- if (empty($entity_id) || !($node = node_load($entity_id))) {
+ if (empty($entity_id) || !($node = $flag->fetch_entity($entity_id))) {
return $flag->access_author == 'others' ? FALSE : NULL;
}