function nodequeue_admin_add_node in Nodequeue 5.2
Same name and namespace in other branches
- 6.2 includes/nodequeue.admin.inc \nodequeue_admin_add_node()
- 7.3 includes/nodequeue.admin.inc \nodequeue_admin_add_node()
- 7.2 includes/nodequeue.admin.inc \nodequeue_admin_add_node()
Page callback to add a node to a queue.
1 string reference to 'nodequeue_admin_add_node'
- nodequeue_menu in ./
nodequeue.module - Implementation of hook_menu
File
- ./
nodequeue.module, line 334
Code
function nodequeue_admin_add_node($queue, $subqueue, $node) {
if (!nodequeue_check_token($node->nid)) {
return drupal_goto();
}
nodequeue_subqueue_add($queue, $subqueue, $node->nid);
// Provide a response if this is javascript.
if (!empty($_POST['js'])) {
if (isset($_GET['tab'])) {
nodequeue_js_output(t('Remove from queue'), url("admin/content/nodequeue/{$queue->qid}/remove-node/{$subqueue->sqid}/{$node->nid}", nodequeue_get_query_string($node->nid, TRUE, array(
'tab',
))), nodequeue_subqueue_size_text($queue->size, $queue->size ? min($subqueue->count + 1, $queue->size) : $subqueue->count + 1, FALSE), $subqueue->sqid);
}
else {
nodequeue_js_output(nodequeue_title_substitute($queue->link_remove, $queue, $subqueue), url("admin/content/nodequeue/{$queue->qid}/remove-node/{$subqueue->sqid}/{$node->nid}", nodequeue_get_query_string($node->nid, TRUE)));
}
}
// There should always be a destination set for this, so just goto wherever.
drupal_goto();
}