You are here

function nodequeue_admin_remove_node in Nodequeue 5.2

Same name and namespace in other branches
  1. 6.2 includes/nodequeue.admin.inc \nodequeue_admin_remove_node()
  2. 7.3 includes/nodequeue.admin.inc \nodequeue_admin_remove_node()
  3. 7.2 includes/nodequeue.admin.inc \nodequeue_admin_remove_node()

Page callback to remove a node from a queue.

1 string reference to 'nodequeue_admin_remove_node'
nodequeue_menu in ./nodequeue.module
Implementation of hook_menu

File

./nodequeue.module, line 362

Code

function nodequeue_admin_remove_node($queue, $subqueue, $node) {
  if (!nodequeue_check_token($node->nid)) {
    return drupal_goto();
  }
  nodequeue_subqueue_remove_node($subqueue->sqid, $node->nid);

  // Provide a response if this is javascript.
  if (!empty($_POST['js'])) {
    if (isset($_GET['tab'])) {
      nodequeue_js_output(t('Add to queue'), url("admin/content/nodequeue/{$queue->qid}/add/{$subqueue->sqid}/{$node->nid}", nodequeue_get_query_string($node->nid, TRUE, array(
        'tab',
      ))), nodequeue_subqueue_size_text($queue->size, $subqueue->count - 1, FALSE), $subqueue->sqid);
    }
    else {
      nodequeue_js_output(nodequeue_title_substitute($queue->link, $queue, $subqueue), url("admin/content/nodequeue/{$queue->qid}/add/{$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();
}