===================================================================
RCS file: /cvs/drupal/drupal/database/updates.inc,v
retrieving revision 1.71
diff -u -r1.71 updates.inc
--- database/updates.inc 4 Nov 2004 06:47:03 -0000 1.71
+++ database/updates.inc 5 Nov 2004 14:13:04 -0000
@@ -86,7 +86,8 @@
   "2004-09-17" => "update_107",
   "2004-10-16" => "update_108",
   "2004-10-18" => "update_109",
-  "2004-10-31: first update since Drupal 4.5.0 release" => "update_110"
+  "2004-10-31: first update since Drupal 4.5.0 release" => "update_110",
+  "2004-11-05" => "update_111"
 );
 
 function update_32() {
@@ -1966,6 +1967,19 @@
   return $ret;
 }
 
+function update_111() {
+  $ret = array();
+
+   if ($GLOBALS['db_type'] == 'mysql') {
+     $ret[] = update_sql("UPDATE {vocabulary} SET nodes = CONCAT('|', REPLACE(nodes, ',', '|'), '|')");
+   }
+   else {
+     $ret[] = update_sql("UPDATE {vocabulary} SET nodes = '|' || REPLACE(nodes, ',', '|') || '|'");
+   }
+
+   return $ret;
+}
+
 function update_sql($sql) {
   $edit = $_POST["edit"];
   $result = db_query($sql);
Index: modules/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy.module,v
retrieving revision 1.154
diff -u -r1.154 taxonomy.module
--- modules/taxonomy.module  31 Oct 2004 07:34:47 -0000 1.154
+++ modules/taxonomy.module  5 Nov 2004 14:13:04 -0000
@@ -123,7 +123,7 @@
   $form .= form_textfield(t('Vocabulary name'), 'name', $edit['name'], 50, 64, t('The name for this vocabulary.  Example: "Topic".'), NULL, TRUE);
   $form .= form_textarea(t('Description'), 'description', $edit['description'], 60, 5, t('Description of the vocabulary; can be used by modules.'));
   $form .= form_textfield(t('Help text'), 'help', $edit['help'], 50, 255, t('Instructions to present to the user when choosing a term.'));
-  $form .= form_checkboxes(t('Types'), 'nodes', explode(',', $edit['nodes']), $nodetypes, t('A list of node types you want to associate with this vocabulary.'), NULL, TRUE);
+  $form .= form_checkboxes(t('Types'), 'nodes', preg_split('<\|>', $edit['nodes'], -1, PREG_SPLIT_NO_EMPTY), $nodetypes, t('A list of node types you want to associate with this vocabulary.'), NULL, TRUE);
   $form .= form_checkbox(t('Related terms'), 'relations', 1, $edit['relations'], t('Allows <a href="%help-url">related terms</a> in this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'related-terms'))));
   $form .= form_radios(t('Hierarchy'), 'hierarchy', $edit['hierarchy'], array(t('Disabled'), t('Single'), t('Multiple')), t('Allows <a href="%help-url">a tree-like hierarchy</a> between terms of this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'hierarchy'))));
   $form .= form_checkbox(t('Multiple select'), 'multiple', 1, $edit['multiple'], t('Allows nodes to have more than one term in this vocabulary.'));
@@ -144,7 +144,7 @@
     $edit['nodes'] = array();
   }
 
-  $data = array('name' => $edit['name'], 'nodes' => implode(',', $edit['nodes']), 'description' => $edit['description'], 'help' => $edit['help'], 'multiple' => $edit['multiple'], 'required' => $edit['required'], 'hierarchy' => $edit['hierarchy'], 'relations' => $edit['relations'], 'weight' => $edit['weight']);
+  $data = array('name' => $edit['name'], 'nodes' => '|' . implode('|', $edit['nodes']) . '|', 'description' => $edit['description'], 'help' => $edit['help'], 'multiple' => $edit['multiple'], 'required' => $edit['required'], 'hierarchy' => $edit['hierarchy'], 'relations' => $edit['relations'], 'weight' => $edit['weight']);
   if ($edit['vid'] && $edit['name']) {
     db_query('UPDATE {vocabulary} SET '. _taxonomy_prepare_update($data) .' WHERE vid = %d', $edit['vid']);
     module_invoke_all('taxonomy', 'update', 'vocabulary', $edit);
@@ -350,7 +350,7 @@
   foreach ($vocabularies as $vocabulary) {
     $links = array();
     $types = array();
-    foreach(explode(',', $vocabulary->nodes) as $type) {
+    foreach(preg_split('<\|>', $vocabulary->nodes, -1, PREG_SPLIT_NO_EMPTY) as $type) {
       $types[] = node_invoke($type, 'node_name');
     }
     $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"));
@@ -392,7 +392,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 LIKE '%%|%s|%%' ORDER BY weight, name", $type);
   }
   else {
     $result = db_query('SELECT * FROM {vocabulary} ORDER BY weight, name');
@@ -421,7 +421,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 LIKE '%%|%s|%%' ORDER BY weight, name", $type);
   while ($vocabulary = db_fetch_object($c)) {
     $result[] = taxonomy_form($vocabulary->vid, $terms, $help, $name);
   }
