diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-10-08 12:21:47 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-10-08 12:21:47 +0000 |
commit | 7863be5e82ccfbaa4aa9bac2343ad9e560130b44 (patch) | |
tree | 4af8979d342a4ce8244fc005162f6d313692ab3d /modules/taxonomy/taxonomy.module | |
parent | 27625fcf836b321f2999569d7d9508735388094e (diff) | |
download | brdo-7863be5e82ccfbaa4aa9bac2343ad9e560130b44.tar.gz brdo-7863be5e82ccfbaa4aa9bac2343ad9e560130b44.tar.bz2 |
- 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
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 10 |
1 files changed, 7 insertions, 3 deletions
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(); |