Index: modules/path/path.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.module,v
retrieving revision 1.119
diff -u -p -r1.119 path.module
--- modules/path/path.module	16 May 2007 13:45:16 -0000	1.119
+++ modules/path/path.module	20 May 2007 12:24:37 -0000
@@ -307,7 +307,10 @@ function path_perm() {
  * When filter key passed, perform a standard search on the given key,
  * and return the list of matching URL aliases.
  */
-function path_admin_overview($keys = NULL) {
+function path_admin_overview() {
+  $keys = path_admin_filter_get_keys(4);
+  // Fetch strings after the third argument, including slashes.
+
   // Add the filter form above the overview table.
   $output = drupal_get_form('path_admin_filter_form', $keys);
   // Enable language column if locale is enabled or if we have any alias with language
@@ -394,20 +397,21 @@ function path_form_submit($form_values, 
 /**
  * Return a form to filter URL aliases.
  */
-function path_admin_filter_form($keys = '') {
+function path_admin_filter_form() {
+  $keys = path_admin_filter_get_keys(4);
+  // Fetch strings after the third argument, including slashes.
+
   $form['#attributes'] = array('class' => 'search-form');
-  $form['basic'] = array('#type' => 'fieldset',
-    '#title' => t('Filter aliases')
-  );
-  $form['basic']['inline'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>');
-  $form['basic']['inline']['filter'] = array(
+  $form['inline'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>');
+  $form['inline']['filter'] = array(
     '#type' => 'textfield',
-    '#title' => '',
+    '#title' => t('Filter aliases'),
     '#default_value' => $keys,
     '#maxlength' => 64,
     '#size' => 25,
   );
-  $form['basic']['inline']['submit'] = array('#type' => 'submit', '#value' => t('Filter'));
+  $form['inline']['submit'] = array('#type' => 'submit', '#value' => t('Filter'));
+  $form['#submit'][] = 'path_admin_filter_form_submit';
 
   return $form;
 }
@@ -415,16 +419,16 @@ function path_admin_filter_form($keys = 
 /**
  * Process filter form submission.
  */
-function path_admin_filter_form_submit($form_id, $form_values) {
-  return 'admin/build/path/list/'. trim($form_values['filter']);
+function path_admin_filter_form_submit(&$form_values) {
+ return drupal_goto('admin/build/path/list/'. trim($form_values['filter']));
 }
 
 /**
  * Helper function for grabbing filter keys.
  */
-function path_admin_filter_get_keys() {
+function path_admin_filter_get_keys($pos) {
   // Extract keys as remainder of path
-  $path = explode('/', $_GET['q'], 5);
-  return count($path) == 5 ? $path[4] : '';
+  $path = explode('/', $_GET['q'], ($pos+1));
+  return count($path) == ($pos+1) ? $path[$pos] : NULL;
 }
 
