You are here

function nodesymlinks_item_delete in NodeSymlinks 6

Same name and namespace in other branches
  1. 7 nodesymlinks.inc \nodesymlinks_item_delete()

Delete menulink and alias of given item. It is not needed to have item fully loaded. Required kes are 'link_path' and 'mlid'.

Parameters

item $item:

1 call to nodesymlinks_item_delete()
_nodesymlinks_nodeapi_insert_update in ./nodesymlinks.inc
Implementation of hook_nodeapi() OP: Insert & Update.

File

./nodesymlinks.inc, line 10

Code

function nodesymlinks_item_delete(&$item) {
  if (module_exists('path')) {
    path_set_alias($item['link_path']);
  }
  menu_link_delete($item['mlid']);

  // Delete our stored copy
  db_query("DELETE FROM {nodesymlinks_link_storage} WHERE mlid = %d", $item['mlid']);
}