summaryrefslogtreecommitdiff
path: root/modules/taxonomy.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/taxonomy.module')
-rw-r--r--modules/taxonomy.module10
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module
index 8bd8ba1f1..1f18319d0 100644
--- a/modules/taxonomy.module
+++ b/modules/taxonomy.module
@@ -311,7 +311,7 @@ function taxonomy_overview() {
/**
* Generate a form element for selecting terms from a vocabulary.
*/
-function taxonomy_form($vid, $value = 0, $error = array(), $help = NULL, $name = 'taxonomy') {
+function taxonomy_form($vid, $value = 0, $help = NULL, $name = 'taxonomy') {
$vocabulary = taxonomy_get_vocabulary($vid);
$help = ($help) ? $help : $vocabulary->help;
if ($vocabulary->required) {
@@ -321,8 +321,6 @@ function taxonomy_form($vid, $value = 0, $error = array(), $help = NULL, $name =
$blank = '<'. t('none') .'>';
}
- $help .= $error['taxonomy'];
-
return _taxonomy_term_select($vocabulary->name, $name, $value, $vid, $help, intval($vocabulary->multiple), $blank);
}
@@ -350,7 +348,7 @@ function taxonomy_get_vocabularies($type = '', $key = 'vid') {
/**
* Generate a form for selecting terms to associate with a node.
*/
-function taxonomy_node_form($type, $node = '', $error = array(), $help = NULL, $name = 'taxonomy') {
+function taxonomy_node_form($type, $node = '', $help = NULL, $name = 'taxonomy') {
if (!$node->taxonomy) {
if ($node->nid) {
$terms = array_keys(taxonomy_node_get_terms($node->nid));
@@ -365,7 +363,7 @@ function taxonomy_node_form($type, $node = '', $error = array(), $help = NULL, $
$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, $error, $help, $name);
+ $result[] = taxonomy_form($vocabulary->vid, $terms, $help, $name);
}
return $result ? $result : array();
}
@@ -695,7 +693,7 @@ function _taxonomy_term_select($title, $name, $value, $vocabulary_id, $descripti
$size = min(12, count($options));
- return form_item($title, "<select name=\"edit[$name][]\"". ($multiple ? " multiple=\"multiple\" size=\"$size\"" : '') . ($extra ? " $extra" : '') .">$select</select>", $description);
+ return form_item($title, "<select name=\"edit[$name][]\"". ($multiple ? " multiple=\"multiple\" size=\"$size\"" : '') . ($extra ? " $extra" : '') .' class="'. _form_get_class('', false, _form_get_error($name)) ."\">$select</select>", $description, NULL, false, _form_get_error($name));
}
}