You are here

function nodequeue_node_access in Nodequeue 6.2

Same name and namespace in other branches
  1. 5.2 nodequeue.module \nodequeue_node_access()
  2. 5 nodequeue.module \nodequeue_node_access()

Return TRUE if $user can queue(s) for this node.

Parameters

$type: The node type.

$location: Optional argument. May be one of:

  • 'links': Only check for queues that have node links.
  • 'tab': Only check for queues that appear on the node tab.
  • 'ui': Only check for queues that appear in the UI.
1 call to nodequeue_node_access()
nodequeue_node_and_queue_access in ./nodequeue.module
Used by menu system to determine access to the node and the queue in question.

File

./nodequeue.module, line 1774
Maintains queues of nodes in arbitrary order.

Code

function nodequeue_node_access($type, $location = NULL, $account = NULL) {
  $qids = nodequeue_get_qids($type, $account);
  if ($location) {
    nodequeue_filter_qids($qids, $location);
  }
  return !empty($qids);
}