diff --git a/og_moderation.module b/og_moderation.module index 3c8cd3a..528d0e7 100644 --- a/og_moderation.module +++ b/og_moderation.module @@ -263,7 +263,6 @@ function og_moderation_form_diff_node_revisions_alter(&$form) { * Apply OG roles for node clone permissions. */ function og_moderation_clone_access_alter(&$data, &$context1 = NULL, &$context2 = NULL, &$context3 = NULL) { - $result = NODE_ACCESS_IGNORE; $node = $context1; if (clone_is_permitted($node->type)) { @@ -271,15 +270,13 @@ function og_moderation_clone_access_alter(&$data, &$context1 = NULL, &$context2 global $user; $gid = $node->og_group_ref[LANGUAGE_NONE][0]['target_id']; if (og_user_access('node', $gid, "clone node")) { - $result = NODE_ACCESS_ALLOW; + $data = NODE_ACCESS_ALLOW; } - if ($user != NULL) { + else if ($user != NULL) { if (($node->uid == $user->uid) && og_user_access('node', $gid, 'clone own nodes', $user)) { - return NODE_ACCESS_ALLOW; + $data = NODE_ACCESS_ALLOW; } } } } - - $data = $result; }