You are here

function nodequeue_subqueue_remove_node in Nodequeue 6.2

Same name and namespace in other branches
  1. 5.2 nodequeue.module \nodequeue_subqueue_remove_node()
  2. 7.3 nodequeue.module \nodequeue_subqueue_remove_node()
  3. 7.2 nodequeue.module \nodequeue_subqueue_remove_node()

Remove a node from the queue. If a node is in the queue more than once, only the first (closest to 0 position, or the front of the queue) will be removed.

Parameters

$sqid: The subqueue to remove nodes from.

$nid: The node to remove.

5 calls to nodequeue_subqueue_remove_node()
NodequeueAPISubqueueUnitTest::testNodequeueSubqueueRemoveNode in tests/nodequeue.test
nodequeue_admin_remove_node in includes/nodequeue.admin.inc
Page callback to remove a node from a queue.
nodequeue_nodeapi in ./nodequeue.module
Implementation of hook_nodeapi().
nodequeue_remove_action in ./nodequeue.module
Action to remove a node from a queue.
nodequeue_save_subqueue_order in includes/nodequeue.admin.inc
Validates new subqueue order information and if it passes validation, deletes the old subqueue data from the database and saves the new data.

File

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

Code

function nodequeue_subqueue_remove_node($sqid, $nid) {
  if ($pos = nodequeue_get_subqueue_position($sqid, $nid)) {
    nodequeue_subqueue_remove($sqid, $pos);
    if (module_exists('apachesolr')) {
      if (function_exists('apachesolr_mark_node')) {
        apachesolr_mark_node($nid);
      }
      else {
        apachesolr_mark_entity('node', $nid);
      }
    }
  }
}