? 881530_vocabulary_field_machine_names.1.patch
? 881530_vocabulary_field_machine_names.2.patch
? 881530_vocabulary_field_machine_names.3.patch
? 881530_vocabulary_field_machine_names.4.patch
? 911354-host-profile.1.patch
? taxonomy_machine_names.patch
? sites/all/modules/head2head/920748_vocabulary_machine_names.1.patch
? sites/default/files
? sites/default/settings.php
Index: modules/forum/forum.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.install,v
retrieving revision 1.50
diff -u -p -r1.50 forum.install
--- modules/forum/forum.install	22 Aug 2010 13:55:53 -0000	1.50
+++ modules/forum/forum.install	23 Sep 2010 16:04:16 -0000
@@ -52,7 +52,7 @@ function forum_enable() {
       'settings' => array(
         'allowed_values' => array(
           array(
-            'vid' => $vocabulary->vid,
+            'vocabulary' => $vocabulary->machine_name,
             'parent' => 0,
           ),
         ),
Index: modules/taxonomy/taxonomy.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.install,v
retrieving revision 1.46
diff -u -p -r1.46 taxonomy.install
--- modules/taxonomy/taxonomy.install	5 Sep 2010 17:00:04 -0000	1.46
+++ modules/taxonomy/taxonomy.install	23 Sep 2010 16:04:17 -0000
@@ -398,7 +398,7 @@ function taxonomy_update_7004() {
         'required' => $vocabulary->required ? TRUE : FALSE,
         'allowed_values' => array(
           array(
-            'vid' => $vocabulary->vid,
+            'vocabulary' => $vocabulary->machine_name,
             'parent' => 0,
           ),
         ),
@@ -440,7 +440,7 @@ function taxonomy_update_7004() {
   $allowed_values = array();
   foreach (taxonomy_get_vocabularies() as $vocabulary) {
     $allowed_values[] = array(
-      'vid' => $vocabulary->vid,
+      'vocabulary' => $vocabulary->machine_name,
       'parent' => 0,
     );
   }
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.605
diff -u -p -r1.605 taxonomy.module
--- modules/taxonomy/taxonomy.module	11 Sep 2010 06:03:12 -0000	1.605
+++ modules/taxonomy/taxonomy.module	23 Sep 2010 16:04:17 -0000
@@ -1059,7 +1059,7 @@ function taxonomy_implode_tags($tags, $v
  *
  * Field settings:
  * - allowed_values: a list array of one or more vocabulary trees:
- *   - vid: a vocabulary ID.
+ *   - vocabulary: a vocabulary machine name.
  *   - parent: a term ID of a term whose children are allowed. This should be
  *     '0' if all terms in a vocabulary are allowed. The allowed values do not
  *     include the parent term.
@@ -1075,7 +1075,7 @@ function taxonomy_field_info() {
       'settings' => array(
         'allowed_values' => array(
           array(
-            'vid' => '0',
+            'vocabulary' => '',
             'parent' => '0',
           ),
         ),
@@ -1149,8 +1149,8 @@ function taxonomy_field_validate($entity
         $validate = FALSE;
         foreach ($field['settings']['allowed_values'] as $settings) {
           // If no parent is specified, check if the term is in the vocabulary.
-          if (isset($settings['vid']) && empty($settings['parent'])) {
-            if ($settings['vid'] == $terms[$item['tid']]->vid) {
+          if (isset($settings['vocabulary']) && empty($settings['parent'])) {
+            if ($settings['vocabulary'] == $terms[$item['tid']]->vocabulary_machine_name) {
               $validate = TRUE;
               break;
             }
@@ -1259,10 +1259,11 @@ function taxonomy_field_formatter_view($
 function taxonomy_allowed_values($field) {
   $options = array();
   foreach ($field['settings']['allowed_values'] as $tree) {
-    $terms = taxonomy_get_tree($tree['vid'], $tree['parent']);
-    if ($terms) {
-      foreach ($terms as $term) {
-        $options[$term->tid] = str_repeat('-', $term->depth) . $term->name;
+    if ($vocabulary = taxonomy_vocabulary_machine_name_load($tree['vocabulary'])) {
+      if ($terms = taxonomy_get_tree($vocabulary->vid, $tree['parent'])) {
+        foreach ($terms as $term) {
+          $options[$term->tid] = str_repeat('-', $term->depth) . $term->name;
+        }
       }
     }
   }
@@ -1361,9 +1362,11 @@ function taxonomy_autocomplete_validate(
   if ($tags = $element['#value']) {
     // Collect candidate vocabularies.
     $field = $form_state['field'][$element['#field_name']][$element['#language']]['field'];
-    $vids = array();
+    $vocabularies = array();
     foreach ($field['settings']['allowed_values'] as $tree) {
-      $vids[] = $tree['vid'];
+      if ($vocabulary = taxonomy_vocabulary_machine_name_load($tree['vocabulary'])) {
+        $vocabularies[$vocabulary->vid] = $vocabulary;
+      }
     }
 
     // Translate term names into actual terms.
@@ -1371,14 +1374,14 @@ function taxonomy_autocomplete_validate(
     foreach ($typed_terms as $typed_term) {
       // See if the term exists in the chosen vocabulary and return the tid;
       // otherwise, create a new 'autocreate' term for insert/update.
-      if ($possibilities = taxonomy_term_load_multiple(array(), array('name' => trim($typed_term), 'vid' => $vids))) {
+      if ($possibilities = taxonomy_term_load_multiple(array(), array('name' => trim($typed_term), 'vid' => array_keys($vocabularies)))) {
         $term = array_pop($possibilities);
       }
       else {
-        $vocabulary = taxonomy_vocabulary_load($vids[0]);
+        $vocabulary = reset($vocabularies);
         $term = array(
           'tid' => 'autocreate',
-          'vid' => $vids[0],
+          'vid' => $vocabulary->vid,
           'name' => $typed_term,
           'vocabulary_machine_name' => $vocabulary->machine_name,
         );
@@ -1404,17 +1407,17 @@ function taxonomy_field_settings_form($f
   $vocabularies = taxonomy_get_vocabularies();
   $options = array();
   foreach ($vocabularies as $vocabulary) {
-    $options[$vocabulary->vid] = $vocabulary->name;
+    $options[$vocabulary->machine_name] = $vocabulary->name;
   }
   $form['allowed_values'] = array(
     '#tree' => TRUE,
   );
 
   foreach ($field['settings']['allowed_values'] as $delta => $tree) {
-    $form['allowed_values'][$delta]['vid'] = array(
+    $form['allowed_values'][$delta]['vocabulary'] = array(
       '#type' => 'select',
       '#title' => t('Vocabulary'),
-      '#default_value' => $tree['vid'],
+      '#default_value' => $tree['vocabulary'],
       '#options' => $options,
       '#required' => TRUE,
       '#description' => t('The vocabulary which supplies the options for this field.'),
Index: modules/taxonomy/taxonomy.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.test,v
retrieving revision 1.90
diff -u -p -r1.90 taxonomy.test
--- modules/taxonomy/taxonomy.test	22 Aug 2010 15:45:03 -0000	1.90
+++ modules/taxonomy/taxonomy.test	23 Sep 2010 16:04:18 -0000
@@ -377,7 +377,7 @@ class TaxonomyTermTestCase extends Taxon
       'settings' => array(
         'allowed_values' => array(
           array(
-            'vid' => $this->vocabulary->vid,
+            'vocabulary' => $this->vocabulary->machine_name,
             'parent' => 0,
           ),
         ),
@@ -843,7 +843,7 @@ class TaxonomyTermFieldTestCase extends 
       'settings' => array(
         'allowed_values' => array(
           array(
-            'vid' => $this->vocabulary->vid,
+            'vocabulary' => $this->vocabulary->machine_name,
             'parent' => '0',
           ),
         ),
@@ -903,7 +903,7 @@ class TaxonomyTermFieldTestCase extends 
       'settings' => array(
         'allowed_values' => array(
           array(
-            'vid' => $this->vocabulary->vid,
+            'vocabulary' => $this->vocabulary->machine_name,
             'parent' => '0',
           ),
         ),
@@ -979,7 +979,7 @@ class TaxonomyTokenReplaceTestCase exten
       'settings' => array(
         'allowed_values' => array(
           array(
-            'vid' => $this->vocabulary->vid,
+            'vocabulary' => $this->vocabulary->machine_name,
             'parent' => 0,
           ),
         ),
