Index: modules/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy.module,v
retrieving revision 1.163
diff -u -r1.163 taxonomy.module
--- modules/taxonomy.module	28 Dec 2004 22:42:47 -0000	1.163
+++ modules/taxonomy.module	16 Jan 2005 13:55:17 -0000
@@ -396,7 +396,7 @@
  */
 function taxonomy_get_vocabularies($type = '', $key = 'vid') {
   if ($type) {
-    $result = db_query("SELECT * FROM {vocabulary} WHERE nodes LIKE '%%%s%%' ORDER BY weight, name", $type);
+    $result = db_query("SELECT * FROM {vocabulary} WHERE nodes = '%s' or nodes LIKE '%s,%%' or nodes LIKE '%%,%s,%%' or nodes LIKE '%%,%s' ORDER BY weight, name", $type, $type, $type, $type);
   }
   else {
     $result = db_query('SELECT * FROM {vocabulary} ORDER BY weight, name');
@@ -425,7 +425,7 @@
     $terms = $node->taxonomy;
   }
 
-  $c = db_query("SELECT * FROM {vocabulary} WHERE nodes LIKE '%%%s%%' ORDER BY weight, name", $type);
+  $c = db_query("SELECT * FROM {vocabulary} WHERE nodes = '%s' or nodes LIKE '%s,%%' or nodes LIKE '%%,%s,%%' or nodes LIKE '%%,%s' ORDER BY weight, name", $type, $type, $type, $type);
   while ($vocabulary = db_fetch_object($c)) {
     $result[] = taxonomy_form($vocabulary->vid, $terms, $help, $name);
   }
