Index: modules/taxonomy/taxonomy.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.admin.inc,v
retrieving revision 1.22.2.1
diff -u -p -r1.22.2.1 taxonomy.admin.inc
--- modules/taxonomy/taxonomy.admin.inc	7 Feb 2008 20:46:57 -0000	1.22.2.1
+++ modules/taxonomy/taxonomy.admin.inc	10 Feb 2008 22:24:58 -0000
@@ -113,6 +113,10 @@ function taxonomy_form_vocabulary(&$form
     'required' => 0,
     'weight' => 0,
   );
+  // Check for confirmation form.
+  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 +199,12 @@ function taxonomy_form_vocabulary(&$form
  * 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')) {
+    // 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'])) {
@@ -217,9 +227,6 @@ function taxonomy_form_vocabulary_submit
  * 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);
 }
 
@@ -866,9 +873,11 @@ function taxonomy_term_confirm_delete_su
 function taxonomy_vocabulary_confirm_delete(&$form_state, $vid) {
   $vocabulary = taxonomy_vocabulary_load($vid);
 
+  $form['#id'] = 'taxonomy_vocabulary_confirm_delete';
   $form['type'] = array('#type' => 'value', '#value' => 'vocabulary');
   $form['vid'] = array('#type' => 'value', '#value' => $vid);
   $form['name'] = array('#type' => 'value', '#value' => $vocabulary->name);
+  $form['#submit'] = array('taxonomy_vocabulary_confirm_delete_submit');
   return confirm_form($form,
                   t('Are you sure you want to delete the vocabulary %title?',
                   array('%title' => $vocabulary->name)),
