From 7863be5e82ccfbaa4aa9bac2343ad9e560130b44 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 8 Oct 2005 12:21:47 +0000 Subject: - Patch #33433 by chx: fixed a number of form API problems. * Default form value * Leftover debug function in form.inc * PHP5 issue with comment date (I got this patch from another issue) * Validation error fix (was calling legacy form validate) * Lots o' warnings on comment preview * Filter tips plus argument (gremlins. I swear this was not there.) * Message to clear what's going on with system settings * Non-freetagging taxonomies fixed --- modules/taxonomy/taxonomy.module | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'modules/taxonomy/taxonomy.module') diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 82b23ce92..eb4ddf67f 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -520,13 +520,17 @@ function taxonomy_node_form($type, $node = '', $help = NULL, $name = 'taxonomy') $typed_string = implode(', ', $typed_terms) . (array_key_exists('tags', $terms) ? $terms['tags'][$vocabulary->vid] : NULL); - $form[$name]['tags'][$vocabulary->vid] = array( type => textfield, default_value => $typed_string, size => 60, maxlength => 100, - autocomplete_path => 'taxonomy/autocomplete/'. $vocabulary->vid, required => ($vocabulary->required ? TRUE : FALSE), title => $vocabulary->name, - description => t('A comma-separated list of terms describing this content (Example: funny, bungie jumping, "Company, Inc.").') ); + $form[$name]['tags'][$vocabulary->vid] = array(type => textfield, default_value => $typed_string, size => 60, 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); $form[$name][$vocabulary->vid] = taxonomy_form($vocabulary->vid, $ntterms, $help, $name); + if ($vocabulary->multiple) { + $form[$name][$vocabulary->vid][parents] = array($name); + } + else { + $form[$name][$vocabulary->vid][tree] = TRUE; + } } } return $form ? $form : array(); -- cgit v1.2.3