You are here

function menu_confirm_delete_form_submit in Drupal 4

Process menu delete form submissions.

File

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

Code

function menu_confirm_delete_form_submit($form_id, $form_values) {
  menu_delete_item($form_values['mid']);
  $t_args = array(
    '%title' => theme('placeholder', $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/menu';
}