diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc index 6b59cb3..08975b2 100644 --- a/modules/menu/menu.admin.inc +++ b/modules/menu/menu.admin.inc @@ -70,7 +70,7 @@ function menu_overview_form($form, &$form_state, $menu) { menu_tree_check_access($tree, $node_links); $menu_admin = FALSE; - $delta = _get_menu_weight_delta($menu['menu_name'], $counter); + $delta = _menu_get_menu_weight_delta($menu['menu_name'], $counter); $form = array_merge($form, _menu_overview_tree_form($tree, $delta)); $form['#menu'] = $menu; @@ -378,7 +378,7 @@ function menu_edit_item($form, &$form_state, $type, $item, $menu) { $form['weight'] = array( '#type' => 'weight', '#title' => t('Weight'), - '#delta' => _get_menu_weight_delta($menu_options), + '#delta' => _menu_get_menu_weight_delta($menu_options), '#default_value' => $item['weight'], '#description' => t('Optional. In the menu, the heavier links will sink and the lighter links will be positioned nearer the top.'), ); diff --git a/modules/menu/menu.module b/modules/menu/menu.module index ea7fbf6..320bc15 100644 --- a/modules/menu/menu.module +++ b/modules/menu/menu.module @@ -626,7 +626,7 @@ function _menu_parent_depth_limit($item) { * - max_weight: Maximum weight for this menu name in the database. * - min_weight: Minimum weight for this menu name in the database. * */ -function _get_menu_link_weight_info($menu_name) { +function _menu_get_menu_link_weight_info($menu_name) { return db_query("SELECT MAX(weight) AS max_weight, MIN(weight) as min_weight FROM {menu_links} WHERE menu_name = :menu", array(':menu' => $menu_name))->fetchObject(); } @@ -640,7 +640,7 @@ function _get_menu_link_weight_info($menu_name) { * - max_weight: Maximum weight for the group of menu names in the database. * - min_weight: Minimum weight for the group of menu names in the database. */ -function _get_multiple_menu_link_weight_info($menu_options) { +function _menu_get_multiple_menu_link_weight_info($menu_options) { return db_query("SELECT MAX(weight) AS max_weight, MIN(weight) as min_weight FROM {menu_links} WHERE menu_name IN (:menu_names)", array(':menu_names' => $menu_options))->fetchObject(); } @@ -655,9 +655,9 @@ function _get_multiple_menu_link_weight_info($menu_options) { * @return int * Delta value for the given menu name or menu names. */ -function _get_menu_weight_delta($menu_name, $max_delta = NULL) { +function _menu_get_menu_weight_delta($menu_name, $max_delta = NULL) { - $weight_info = is_array($menu_name) ? _get_multiple_menu_link_weight_info($menu_name) : _get_menu_link_weight_info($menu_name); + $weight_info = is_array($menu_name) ? _menu_get_multiple_menu_link_weight_info($menu_name) : _menu_get_menu_link_weight_info($menu_name); $delta = max(abs($weight_info->min_weight), abs($weight_info->max_weight)) + 1; @@ -773,7 +773,7 @@ function menu_form_node_form_alter(&$form, $form_state) { $form['menu']['link']['weight'] = array( '#type' => 'weight', '#title' => t('Weight'), - '#delta' => _get_menu_weight_delta($menu_options), + '#delta' => _menu_get_menu_weight_delta($menu_options), '#default_value' => $link['weight'], '#description' => t('Menu links with smaller weights are displayed before links with larger weights.'), );