You are here

function _prev_next_remove in Previous/Next API 6

Same name and namespace in other branches
  1. 7.2 prev_next.module \_prev_next_remove()
  2. 7 prev_next.module \_prev_next_remove()

Delete from the prev_next records.

1 call to _prev_next_remove()
prev_next_nodeapi in ./prev_next.module
Implementation of hook_nodeapi().

File

./prev_next.module, line 466

Code

function _prev_next_remove($nid) {

  // Find if there is an entry for this node
  $node = db_fetch_object(db_query("SELECT nid, prev_nid, next_nid, changed FROM {prev_next_node} WHERE nid = %d", $nid));
  if ($node) {

    // Delete the data for this node
    db_query("DELETE FROM {prev_next_node} WHERE nid = %d", $nid);
  }

  // Find out if any other nodes point to this node and update them
  _prev_next_modify_pointing_nodes($nid);
}