diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-12-06 12:20:24 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-12-06 12:20:24 +0000 |
commit | 32d9af49169f47cbaad8940b284153dffb664afe (patch) | |
tree | a0fd34979af42ed7e9c5c0eecb824ae337b5dca9 /modules/taxonomy/taxonomy.module | |
parent | e90a178e5d60dd5907d724c0f3cbe51b3e49ddb9 (diff) | |
download | brdo-32d9af49169f47cbaad8940b284153dffb664afe.tar.gz brdo-32d9af49169f47cbaad8940b284153dffb664afe.tar.bz2 |
- Patch #39598 by Gerhard: fixed problem with taxonomy terms not being selected.
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index a3f3a796d..5b4bd3627 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -498,7 +498,7 @@ function taxonomy_form_alter($form_id, &$form) { if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) { $node = $form['#node']; - if (!array_key_exists('taxonomy', $node)) { + if (!isset($node->taxonomy)) { if ($node->nid) { $terms = taxonomy_node_get_terms($node->nid); } @@ -531,7 +531,8 @@ 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' => t('A comma-separated list of terms describing this content (Example: funny, bungie jumping, "Company, Inc.").')); } else { - $ntterms = array_key_exists('taxonomy', $node) ? $terms : array_keys($terms); + $ntterms = isset($node->taxonomy) ? $terms : array_keys($terms); + $form['taxonomy'][$vocabulary->vid] = taxonomy_form($vocabulary->vid, $ntterms, $help, 'taxonomy'); } } |