diff -u b/project_issue.module b/project_issue.module --- b/project_issue.module +++ b/project_issue.module @@ -171,16 +171,6 @@ ); } - // Outputs JSON for "Issue tags" taxonomy autocomplete suggestions. - // Original path "taxonomy/autocomplete/%/%" still works from taxonomy.module. - // This affects only "taxonomy/autocomplete/taxonomy_vocabulary_9" to add sorting. - $items['taxonomy/autocomplete/taxonomy_vocabulary_9'] = array( - 'title' => 'Issue tags Autocomplete', - 'page callback' => 'project_issue_issue_tag_autocomplete', - 'access arguments' => array('access content'), - 'type' => MENU_CALLBACK, - ); - return $items; } @@ -202,6 +192,16 @@ $items['node/add/' . $type_url_str]['file'] = 'issue_node_add.inc'; $items['node/add/' . $type_url_str]['file path'] = drupal_get_path('module', 'project_issue') . '/includes'; } + foreach (taxonomy_get_vocabularies() as $vid => $vocabulary) { + if (variable_get('project_issue_taxonomy_vocabulary_issue_queue_' . $vid, 0) === 'autocomplete') { + $items['taxonomy/autocomplete/taxonomy_vocabulary_'.$vid] = array( + 'title' => 'Issue tags Autocomplete', + 'page callback' => 'project_issue_issue_tag_autocomplete', + 'access arguments' => array('access content'), + 'type' => MENU_CALLBACK, + ); + } + } } /**