Index: modules/taxonomy.module =================================================================== RCS file: /cvs/drupal/drupal/modules/taxonomy.module,v retrieving revision 1.176 diff -u -F^f -r1.176 taxonomy.module --- modules/taxonomy.module 21 Feb 2005 19:47:44 -0000 1.176 +++ modules/taxonomy.module 25 Feb 2005 17:18:46 -0000 @@ -367,7 +371,7 @@ function taxonomy_overview() { $types[] = $node_type ? $node_type : $type; } - $rows[] = array($vocabulary->name, array('data' => implode(', ', $types), 'align' => 'center'), l(t('edit vocabulary'), "admin/taxonomy/edit/vocabulary/$vocabulary->vid"), l(t('add term'), "admin/taxonomy/add/term/$vocabulary->vid"), l(t('preview form'), "admin/taxonomy/preview/vocabulary/$vocabulary->vid")); + $rows[] = array($vocabulary->name, implode(', ', $types), l(t('edit vocabulary'), "admin/taxonomy/edit/vocabulary/$vocabulary->vid"), l(t('add term'), "admin/taxonomy/add/term/$vocabulary->vid"), l(t('preview form'), "admin/taxonomy/preview/vocabulary/$vocabulary->vid")); $tree = taxonomy_get_tree($vocabulary->vid); if ($tree) { @@ -404,9 +408,9 @@ function taxonomy_form($vid, $value = 0, } /** -* Generate a set of options for selecting a term from all vocabularies. Can be -* passed to form_select. -*/ + * Generate a set of options for selecting a term from all vocabularies. Can be + * passed to form_select. + */ function taxonomy_form_all($value = 0, $help = NULL, $name = 'taxonomy') { $vocabularies = taxonomy_get_vocabularies(); $options = array(); @@ -429,12 +433,11 @@ function taxonomy_form_all($value = 0, $ * If set, return only those vocabularies associated with this node type. */ function taxonomy_get_vocabularies($type = NULL) { - if ($type) { - $result = db_query("SELECT v.*, n.type FROM {vocabulary_node_types} n INNER JOIN {vocabulary} v ON v.vid = n.vid WHERE n.type = '%s' ORDER BY v.weight, v.name", $type); + $result = db_query("SELECT v.*, n.type FROM {vocabulary} v LEFT JOIN {vocabulary_node_types} n ON v.vid = n.vid WHERE n.type = '%s' ORDER BY v.weight, v.name", $type); } else { - $result = db_query('SELECT v.*, n.type FROM {vocabulary_node_types} n INNER JOIN {vocabulary} v ON v.vid = n.vid ORDER BY v.weight, v.name'); + $result = db_query('SELECT v.*, n.type FROM {vocabulary} v LEFT JOIN {vocabulary_node_types} n ON v.vid = n.vid ORDER BY v.weight, v.name'); } $vocabularies = array(); @@ -734,7 +744,7 @@ function taxonomy_get_term_by_name($name * Return the vocabulary object matching a vocabulary ID. */ function taxonomy_get_vocabulary($vid) { - $result = db_query('SELECT v.*, n.type FROM {vocabulary_node_types} n INNER JOIN {vocabulary} v ON v.vid = n.vid WHERE v.vid = %d ORDER BY v.weight, v.name', $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;