You are here

function _nodehierarchy_get_menu_link_next_child_weight in Node Hierarchy 6.3

Same name and namespace in other branches
  1. 6.2 nodehierarchy.module \_nodehierarchy_get_menu_link_next_child_weight()
  2. 7.2 nodehierarchy.module \_nodehierarchy_get_menu_link_next_child_weight()

Get the next child weight for a given plid.

1 call to _nodehierarchy_get_menu_link_next_child_weight()
_nodehierarchy_save_menu_link in ./nodehierarchy.module
Save a menu link with changes if needed.

File

./nodehierarchy.module, line 1436
A module to make nodes hierarchical.

Code

function _nodehierarchy_get_menu_link_next_child_weight($plid) {
  $out = db_result(db_query("SELECT MAX(weight) FROM {menu_links} WHERE module = 'nodehierarchy' AND plid = %d", $plid));
  if ($out !== NULL) {
    return $out + 1;
  }
  return 0;
}