Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.337
diff -u -p -r1.337 taxonomy.module
--- modules/taxonomy/taxonomy.module   31 Jan 2007 21:26:56 -0000   1.337
+++ modules/taxonomy/taxonomy.module   7 Feb 2007 21:14:04 -0000
@@ -231,11 +231,10 @@ function taxonomy_form_vocabulary($edit 
     '#description' => t('Instructions to present to the user when choosing a term.'),
   );
   $form['nodes'] = array('#type' => 'checkboxes',
-    '#title' => t('Types'),
+    '#title' => t('Content types'),
     '#default_value' => $edit['nodes'],
     '#options' => node_get_types('names'),
-    '#description' => t('A list of node types you want to associate with this vocabulary.'),
-    '#required' => TRUE,
+    '#description' => t('A list of content types you want to associate with this vocabulary.'),
   );
   $form['hierarchy'] = array('#type' => 'radios',
     '#title' => t('Hierarchy'),
@@ -286,12 +285,21 @@ function taxonomy_form_vocabulary_submit
   $form_values['nodes'] = array_filter($form_values['nodes']);
   switch (taxonomy_save_vocabulary($form_values)) {
     case SAVED_NEW:
-      drupal_set_message(t('Created new vocabulary %name.', array('%name' => $form_values['name'])));
+      $message = t('Created new vocabulary %name.', array('%name' => $form_values['name']));
       break;
     case SAVED_UPDATED:
-      drupal_set_message(t('Updated vocabulary %name.', array('%name' => $form_values['name'])));
+      $message = t('Updated vocabulary %name.', array('%name' => $form_values['name']));
       break;
   }
+
+  if (isset($message)) {
+    // If the user did not select any content types, show a warning.
+    if (!$form_values['nodes']) {
+      $message .= ' '. t('This vocabulary is not currently associated with any content types. While not required, it is usually a good idea to <a href="@edit-taxonomy">select at least one content type</a>.', array('@edit-taxonomy' => url('admin/content/taxonomy/edit/vocabulary/'. $form_values['vid'])));
+    }
+    drupal_set_message($message);
+  }
+
   return 'admin/content/taxonomy';
 }
 
@@ -1116,7 +1124,9 @@ function taxonomy_get_vocabulary($vid) {
     $result = db_query('SELECT v.*, n.type FROM {vocabulary} v LEFT JOIN {vocabulary_node_types} n ON v.vid = n.vid WHERE v.vid = %d ORDER BY v.weight, v.name', $vid);
     $node_types = array();
     while ($voc = db_fetch_object($result)) {
-      $node_types[] = $voc->type;
+      if (!empty($voc->type)) {
+        $node_types[] = $voc->type;
+      }
       unset($voc->type);
       $voc->nodes = $node_types;
       $vocabularies[$vid] = $voc;


