From 85161f230f0f1b8a409b39a47ee346f6bd60a33a Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Fri, 13 Nov 2009 09:24:06 +0000 Subject: [PATCH] - Patch #631066 by yhed: taxonomy_autocomplete() doesn't need to access . --- modules/taxonomy/taxonomy.module | 3 +-- modules/taxonomy/taxonomy.pages.inc | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 677321c13cc3..5de8aa538188 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -1216,8 +1216,7 @@ function taxonomy_field_widget(&$form, &$form_state, $field, $instance, $langcod $element += array( '#type' => 'textfield', '#default_value' => taxonomy_implode_tags($tags), - // @todo Path should include the object type as well. - '#autocomplete_path' => 'taxonomy/autocomplete/'. $field['field_name'] .'/'. $instance['bundle'], + '#autocomplete_path' => $instance['widget']['settings']['autocomplete_path'] . '/' . $field['field_name'], '#size' => $instance['widget']['settings']['size'], '#element_validate' => array('taxonomy_autocomplete_validate'), ); diff --git a/modules/taxonomy/taxonomy.pages.inc b/modules/taxonomy/taxonomy.pages.inc index f79dc97a35ba..83c9c987003c 100644 --- a/modules/taxonomy/taxonomy.pages.inc +++ b/modules/taxonomy/taxonomy.pages.inc @@ -77,8 +77,7 @@ function taxonomy_term_feed($term) { /** * Helper function for autocompletion */ -function taxonomy_autocomplete($field_name, $bundle, $tags_typed = '') { - $instance = field_info_instance($field_name, $bundle); +function taxonomy_autocomplete($field_name, $tags_typed = '') { $field = field_info_field($field_name); // The user enters a comma-separated list of tags. We only autocomplete the last tag. -- GitLab