diff --git a/modules/forum.module b/modules/forum.module index 890ff48c2e3..7db15147247 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -604,7 +604,7 @@ function forum_form(&$node) { function forum_prepare(&$node) { if (!$node->nid) { // new topic - $node->taxonomy[] = arg(3); + $node->taxonomy[arg(3)] = 1; } } diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 890ff48c2e3..7db15147247 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -604,7 +604,7 @@ function forum_form(&$node) { function forum_prepare(&$node) { if (!$node->nid) { // new topic - $node->taxonomy[] = arg(3); + $node->taxonomy[arg(3)] = 1; } } diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 374bf600321..d7e27604a51 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -531,8 +531,7 @@ function taxonomy_form_alter($form_id, &$form) { $form['taxonomy']['tags'][$vocabulary->vid] = array('#type' => 'textfield', '#default_value' => $typed_string, '#maxlength' => 100, '#autocomplete_path' => 'taxonomy/autocomplete/'. $vocabulary->vid, '#required' => $vocabulary->required, '#title' => $vocabulary->name, '#description' => $help); } else { - $ntterms = isset($node->taxonomy) ? $terms : array_keys($terms); - $form['taxonomy'][$vocabulary->vid] = taxonomy_form($vocabulary->vid, $ntterms, $help, 'taxonomy'); + $form['taxonomy'][$vocabulary->vid] = taxonomy_form($vocabulary->vid, array_keys($terms), $help); $form['taxonomy'][$vocabulary->vid]['#weight'] = $vocabulary->weight; } } diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 374bf600321..d7e27604a51 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -531,8 +531,7 @@ function taxonomy_form_alter($form_id, &$form) { $form['taxonomy']['tags'][$vocabulary->vid] = array('#type' => 'textfield', '#default_value' => $typed_string, '#maxlength' => 100, '#autocomplete_path' => 'taxonomy/autocomplete/'. $vocabulary->vid, '#required' => $vocabulary->required, '#title' => $vocabulary->name, '#description' => $help); } else { - $ntterms = isset($node->taxonomy) ? $terms : array_keys($terms); - $form['taxonomy'][$vocabulary->vid] = taxonomy_form($vocabulary->vid, $ntterms, $help, 'taxonomy'); + $form['taxonomy'][$vocabulary->vid] = taxonomy_form($vocabulary->vid, array_keys($terms), $help); $form['taxonomy'][$vocabulary->vid]['#weight'] = $vocabulary->weight; } }