Index: taxonomy.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.admin.inc,v
retrieving revision 1.23
diff -u -r1.23 taxonomy.admin.inc
--- taxonomy.admin.inc	8 Feb 2008 02:52:39 -0000	1.23
+++ taxonomy.admin.inc	10 Feb 2008 03:38:48 -0000
@@ -101,6 +101,8 @@
  * @see taxonomy_form_vocabulary_submit()
  */
 function taxonomy_form_vocabulary(&$form_state, $edit = array()) {
+  $edit = (array)$edit;
+
   $edit += array(
     'name' => '',
     'description' => '',
@@ -113,6 +115,12 @@
     'required' => 0,
     'weight' => 0,
   );
+
+  // Check for confirmation forms.
+  if (isset($form_state['confirm_delete'])) {
+    return taxonomy_vocabulary_confirm_delete($form_state, $edit['vid']);
+  } 
+
   $form['identification'] = array(
     '#type' => 'fieldset',
     '#title' => t('Identification'),
@@ -195,6 +203,17 @@
  * Accept the form submission for a vocabulary and save the results.
  */
 function taxonomy_form_vocabulary_submit($form, &$form_state) {
+  if ($form_state['clicked_button']['#value'] == t('Delete')) {
+    // Execute the term deletion.
+    if ($form_state['values']['delete'] === TRUE) {
+      return taxonomy_vocabulary_confirm_delete_submit($form, $form_state);
+    }
+    // Rebuild the form to confirm term deletion.
+    $form_state['rebuild'] = TRUE;
+    $form_state['confirm_delete'] = TRUE;
+    return;
+  }
+
   // Fix up the nodes array to remove unchecked nodes.
   $form_state['values']['nodes'] = array_filter($form_state['values']['nodes']);
   switch (taxonomy_save_vocabulary($form_state['values'])) {
@@ -214,16 +233,6 @@
 }
 
 /**
- * Page to edit a vocabulary.
- */
-function taxonomy_admin_vocabulary_edit($vocabulary) {
-  if ((isset($_POST['op']) && $_POST['op'] == t('Delete')) || isset($_POST['confirm'])) {
-    return drupal_get_form('taxonomy_vocabulary_confirm_delete', $vocabulary->vid);
-  }
-  return drupal_get_form('taxonomy_form_vocabulary', (array)$vocabulary);
-}
-
-/**
  * Page to edit a vocabulary term.
  */
 function taxonomy_admin_term_edit($tid) {
@@ -869,6 +878,7 @@
   $form['type'] = array('#type' => 'value', '#value' => 'vocabulary');
   $form['vid'] = array('#type' => 'value', '#value' => $vid);
   $form['name'] = array('#type' => 'value', '#value' => $vocabulary->name);
+  $form['delete'] = array('#type' => 'value', '#value' => TRUE);
   return confirm_form($form,
                   t('Are you sure you want to delete the vocabulary %title?',
                   array('%title' => $vocabulary->name)),
Index: taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.414
diff -u -r1.414 taxonomy.module
--- taxonomy.module	27 Jan 2008 17:55:15 -0000	1.414
+++ taxonomy.module	10 Feb 2008 03:38:48 -0000
@@ -135,8 +135,8 @@
 
   $items['admin/content/taxonomy/edit/vocabulary/%taxonomy_vocabulary'] = array(
     'title' => 'Edit vocabulary',
-    'page callback' => 'taxonomy_admin_vocabulary_edit',
-    'page arguments' => array(5),
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('taxonomy_form_vocabulary', 5),
     'type' => MENU_CALLBACK,
     'file' => 'taxonomy.admin.inc',
   );
