You are here

function taxonomy_menu_node_presave in Taxonomy menu 7

Same name and namespace in other branches
  1. 8 taxonomy_menu.module \taxonomy_menu_node_presave()
  2. 7.2 taxonomy_menu.module \taxonomy_menu_node_presave()

Implements hook_node_presave().

File

./taxonomy_menu.module, line 444
Adds links to taxonomy terms into a menu.

Code

function taxonomy_menu_node_presave($node) {
  $terms_old =& drupal_static('taxonomy_menu_terms_old');

  // Get the terms from the database before the changes are made. These will be
  // used to update the menu item's name if needed we go directly to the db to
  // bypass any caches.
  if (isset($node->nid)) {
    $node_old = node_load($node->nid);
    $terms_old = _taxonomy_menu_get_node_terms($node_old);
  }
  else {
    $terms_old = array();
  }
}