=== modified file 'modules/path/path.module'
--- modules/path/path.module	2007-06-24 10:09:50 +0000
+++ modules/path/path.module	2007-06-25 00:55:17 +0000
@@ -74,14 +74,14 @@ function path_menu() {
 /**
  * Menu callback; handles pages for creating and editing URL aliases.
  */
-function path_admin_edit($pid = 0) {
+function path_admin_edit(&$form_state, $pid = 0) {
   if ($pid) {
     $alias = path_load($pid);
     drupal_set_title(check_plain($alias['dst']));
-    $output = path_form($alias);
+    $output = path_form($form_state, $alias);
   }
   else {
-    $output = path_form();
+    $output = path_form($form_state);
   }
 
   return $output;
@@ -93,32 +93,25 @@ function path_admin_edit($pid = 0) {
 function path_admin_delete_confirm(&$form_state, $pid) {
   $path = path_load($pid);
   if (user_access('administer url aliases')) {
-    $form['pid'] = array('#type' => 'value', '#value' => $pid);
-    $options = array('cancel' => isset($_GET['destination']) ? $_GET['destination'] : 'admin/build/path');
-    $output = confirm_form($form,
-  t('Are you sure you want to delete path alias %title?', array('%title' => $path['dst'])),
-   'admin/build/path', $options);
-  }
-  return $output;
-}
-
-/**
- * Execute URL alias deletion
- **/
-function path_admin_delete_confirm_submit($form, &$form_state) {
-  if ($form_state['values']['confirm']) {
-    path_admin_delete($form_state['values']['pid']);
-    $form_state['redirect'] = 'admin/build/path';
-    return;
+    drupal_delete_initiate('path', $pid);
+    drupal_delete_add_callback(array('path_admin_delete'));
+    drupal_delete_add_query("DELETE FROM {url_alias} WHERE pid = %d", $pid);
+
+    return drupal_delete_confirm(
+      array(
+        'question' => t('Are you sure you want to delete path alias %title?', array('%title' => $path['dst'])),
+        'destination' => isset($_GET['destination']) ? $_GET['destination'] : 'admin/build/path'
+      )
+    );    
   }
 }
 
 /**
  * Post-confirmation; delete an URL alias.
  */
-function path_admin_delete($pid = 0) {
-  db_query('DELETE FROM {url_alias} WHERE pid = %d', $pid);
+function path_admin_delete() {
   drupal_set_message(t('The alias has been deleted.'));
+  drupal_clear_path_cache();
 }
 
 /**
@@ -127,12 +120,12 @@ function path_admin_delete($pid = 0) {
 function path_set_alias($path = NULL, $alias = NULL, $pid = NULL, $language = '') {
   if ($path && !$alias) {
     // Delete based on path
-    drupal_delete_add_query("DELETE FROM {url_alias} WHERE src = '%s' AND language = '%s'", $path, $language);
+    db_query("DELETE FROM {url_alias} WHERE src = '%s' AND language = '%s'", $path, $language);
     drupal_clear_path_cache();
   }
   else if (!$path && $alias) {
     // Delete based on alias
-    drupal_delete_add_query("DELETE FROM {url_alias} WHERE dst = '%s' AND language = '%s'", $alias, $language);
+    db_query("DELETE FROM {url_alias} WHERE dst = '%s' AND language = '%s'", $alias, $language);
     drupal_clear_path_cache();
   }
   else if ($path && $alias) {
@@ -407,6 +400,7 @@ function path_admin_filter_form(&$form_s
     '#size' => 25,
   );
   $form['basic']['inline']['submit'] = array('#type' => 'submit', '#value' => t('Filter'));
+  $form['basic']['inline']['reset'] = array('#type' => 'submit', '#value' => t('Reset'));
 
   return $form;
 }
@@ -415,7 +409,13 @@ function path_admin_filter_form(&$form_s
  * Process filter form submission.
  */
 function path_admin_filter_form_submit($form, &$form_state) {
-  return 'admin/build/path/list/'. trim($form_state['values']['filter']);
+  switch ($form_state['values']['op']) {
+    case t('Filter'):
+      $form_state['redirect'] = 'admin/build/path/list/'. trim($form_state['values']['filter']);
+      break;
+    default:
+      $form_state['redirect'] = 'admin/build/path/list/';
+  }
 }
 
 /**

