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 13:09:01 -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() { + $args = func_get_args(); + $keys = implode('/', $args); + // 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() { + $args = func_get_args(); + $keys = implode('/', $args); + $form['#attributes'] = array('class' => 'search-form'); - $form['basic'] = array('#type' => 'fieldset', - '#title' => t('Filter aliases') - ); - $form['basic']['inline'] = array('#prefix' => '
', '#suffix' => '
'); - $form['basic']['inline']['filter'] = array( + $form['inline'] = array('#prefix' => '
', '#suffix' => '
'); + $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,7 @@ 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']); -} - -/** - * Helper function for grabbing filter keys. - */ -function path_admin_filter_get_keys() { - // Extract keys as remainder of path - $path = explode('/', $_GET['q'], 5); - return count($path) == 5 ? $path[4] : ''; +function path_admin_filter_form_submit(&$form_values) { + return drupal_goto('admin/build/path/list/'. trim($form_values['filter'])); }