function nodequeue_nodequeue_access in Nodequeue 7.2
Same name and namespace in other branches
- 7.3 nodequeue.module \nodequeue_nodequeue_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.
object $account:
Return value
bool if $qids is empty it will return FALSE else TRUE.
1 call to nodequeue_nodequeue_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 2396 - Maintains queues of nodes in arbitrary order.
Code
function nodequeue_nodequeue_access($type, $location = NULL, $account = NULL) {
if (isset($type->type)) {
$type = $type->type;
}
$qids = nodequeue_get_qids($type, $account);
if ($location) {
nodequeue_filter_qids($qids, $location);
}
return !empty($qids);
}