You are here

function menu_item_delete_form_submit in Drupal 5

Same name and namespace in other branches
  1. 6 modules/menu/menu.admin.inc \menu_item_delete_form_submit()
  2. 7 modules/menu/menu.admin.inc \menu_item_delete_form_submit()

Process menu delete form submissions.

File

modules/menu/menu.module, line 445
Allows administrators to customize the site navigation menu.

Code

function menu_item_delete_form_submit($form_id, $form_values) {
  menu_delete_item($form_values['mid']);
  $t_args = array(
    '%title' => $form_values['title'],
  );
  if ($form_values['type'] & MENU_IS_ROOT) {
    drupal_set_message(t('The menu %title has been deleted.', $t_args));
    watchdog('menu', t('Deleted menu %title.', $t_args), WATCHDOG_NOTICE);
  }
  else {
    drupal_set_message(t('The menu item %title has been deleted.', $t_args));
    watchdog('menu', t('Deleted menu item %title.', $t_args), WATCHDOG_NOTICE);
  }
  return 'admin/build/menu';
}