function _nodequeue_queue_remove in Nodequeue 5
4 calls to _nodequeue_queue_remove()
- nodequeue_admin_operate in ./
nodequeue.module - Page callback to operate on a queue, moving items up or down if javascript is disabled.
- nodequeue_page in ./
nodequeue.module - Display the queue page for a node, allowing the user to control how the node exists in various queues. This controls a couple of different paths.
- nodequeue_queue_remove in ./
nodequeue.module - _nodequeue_check_queuesize in ./
nodequeue.module
File
- ./
nodequeue.module, line 824
Code
function _nodequeue_queue_remove(&$queue, $start, $end = 0) {
if (!$end) {
$end = $start;
}
$diff = $end - $start + 1;
db_query("DELETE FROM {nodequeue_nodes} WHERE qid = %d AND position >= %d AND position <= %d", $queue->qid, $start, $end);
db_query("UPDATE {nodequeue_nodes} SET position = position - %d WHERE qid = %d AND position > %d", $diff, $queue->qid, $end);
$queue->count -= $diff;
}