summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r--modules/taxonomy/taxonomy.module10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 68639d4ab..0d32a606b 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -299,7 +299,7 @@ function taxonomy_overview() {
return theme("table", $header, $rows);
}
-function taxonomy_form($vocabulary_id, $value = 0) {
+function taxonomy_form($vocabulary_id, $value = 0, $error = array()) {
$vocabulary = taxonomy_get_vocabulary($vocabulary_id);
if ($vocabulary->required) {
$descriptions = array(t("You must choose one term for this node."), t("You must choose one or more terms for this node."));
@@ -312,7 +312,9 @@ function taxonomy_form($vocabulary_id, $value = 0) {
$multiple = intval($vocabulary->multiple);
- return _taxonomy_term_select($vocabulary->name, "taxonomy", $value, $vocabulary_id, $descriptions[$multiple], $multiple, $blank);
+ $description = $descriptions[$multiple] . $error['taxonomy'];
+
+ return _taxonomy_term_select($vocabulary->name, 'taxonomy', $value, $vocabulary_id, $description, $multiple, $blank);
}
/*
@@ -336,7 +338,7 @@ function taxonomy_get_vocabularies($type = '', $key = "vid") {
}
// return form with current term
-function taxonomy_node_form($type, $node = '') {
+function taxonomy_node_form($type, $node = '', $error = array()) {
if (!$node->taxonomy) {
if ($node->nid) {
$terms = array_keys(taxonomy_node_get_terms($node->nid));
@@ -351,7 +353,7 @@ function taxonomy_node_form($type, $node = '') {
$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);
+ $result[] .= taxonomy_form($vocabulary->vid, $terms, $error);
}
return $result ? $result : array();
}