=== modified file 'modules/node/content_types.inc'
--- modules/node/content_types.inc	2007-06-22 16:08:56 +0000
+++ modules/node/content_types.inc	2007-06-23 18:42:55 +0000
@@ -379,37 +379,40 @@ function node_type_reset(&$type) {
  * Menu callback; delete a single content type.
  */
 function node_type_delete_confirm(&$form_state, $type) {
-  $form['type'] = array('#type' => 'value', '#value' => $type->type);
-  $form['name'] = array('#type' => 'value', '#value' => $type->name);
 
-  $message = t('Are you sure you want to delete the content type %type?', array('%type' => $type->name));
-  $caption = '';
 
+  drupal_delete_initiate('node_type', $type->type);
+
+  node_type_delete($type->type);
+
+  drupal_delete_add_callback(array('node_type_delete_confirm_post' => array($type)));
+
+  $caption = '';
   $num_nodes = db_num_rows(db_query("SELECT * FROM {node} WHERE type = '%s'", $type->type));
   if ($num_nodes) {
     $caption .= '<p>'. format_plural($num_nodes, '<strong>Warning:</strong> there is currently 1 %type post on your site. It may not be able to be displayed or edited correctly, once you have removed this content type.', '<strong>Warning:</strong> there are currently @count %type posts on your site. They may not be able to be displayed or edited correctly, once you have removed this content type.', array('%type' => $type->name)) .'</p>';
   }
-
   $caption .= '<p>'. t('This action cannot be undone.') .'</p>';
 
-  $options = array('description' => $caption);
-
-  return confirm_form($form, $message, 'admin/content/types', $options);
+  return drupal_delete_confirm(
+    array(
+      'form' => $form,
+      'question' => t('Are you sure you want to delete the content type %type?', array('%type' => $type->name)),
+      'cancel' => 'admin/content/types',
+      'description' => $caption,
+      'destination' => 'admin/content/types',
+    )
+  );
 }
 
 /**
  * Process content type delete confirm submissions.
  */
-function node_type_delete_confirm_submit($form, &$form_state) {
-  node_type_delete($form_state['values']['type']);
-
-  $t_args = array('%name' => $form_state['values']['name']);
+function node_type_delete_confirm_post($type) {
+  $t_args = array('%name' => $type->name);
   drupal_set_message(t('The content type %name has been deleted.', $t_args));
   watchdog('menu', 'Deleted content type %name.', $t_args, WATCHDOG_NOTICE);
 
   node_types_rebuild();
   menu_rebuild();
-
-  $form_state['redirect'] = 'admin/content/types';
-  return;
 }

=== modified file 'modules/node/node.module'
--- modules/node/node.module	2007-06-23 15:17:21 +0000
+++ modules/node/node.module	2007-06-23 18:44:02 +0000
@@ -375,7 +375,7 @@ function node_type_save($info) {
  *   The machine-readable name of the node type to be deleted.
  */
 function node_type_delete($type) {
-  db_query("DELETE FROM {node_type} WHERE type = '%s'", $type);
+  drupal_delete_add_query("DELETE FROM {node_type} WHERE type = '%s'", $type);
 
   $info = node_get_types('type', $type);
   module_invoke_all('node_type', 'delete', $info);

=== modified file 'modules/taxonomy/taxonomy.module'
--- modules/taxonomy/taxonomy.module	2007-06-22 16:08:56 +0000
+++ modules/taxonomy/taxonomy.module	2007-06-23 18:50:40 +0000
@@ -896,7 +896,7 @@ function taxonomy_node_type($op, $info) 
     db_query("UPDATE {vocabulary_node_types} SET type = '%s' WHERE type = '%s'", $info->type, $info->old_type);
   }
   elseif ($op == 'delete') {
-    db_query("DELETE FROM {vocabulary_node_types} WHERE type = '%s'", $info->type);
+    drupal_delete_add_query("DELETE FROM {vocabulary_node_types} WHERE type = '%s'", $info->type);
   }
 }
 

