diff options
Diffstat (limited to 'modules/forum/forum.module')
-rw-r--r-- | modules/forum/forum.module | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 3b9aa295f..dbd1944e9 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -246,7 +246,7 @@ function forum_validate(&$node) { if (db_result(db_query('SELECT COUNT(*) FROM {term_data} WHERE tid = %d AND vid = %d', $term, $vocabulary))) { if (in_array($term, $containers)) { $term = taxonomy_get_term($term); - $error['taxonomy'] = theme('error', t('The item \'%forum\' is only a container for forums. Please select one of the forums below it.', array('%forum' => $term->name))); + form_set_error('taxonomy', t('The item \'%forum\' is only a container for forums. Please select one of the forums below it.', array('%forum' => $term->name))); } else { $node->tid = $term; @@ -254,19 +254,18 @@ function forum_validate(&$node) { } } } - return $error; } /** * Implementation of hook_form(). */ -function forum_form(&$node, &$error) { +function forum_form(&$node) { if (!$node->nid) { // new topic $node->taxonomy[] = arg(3); } - $output = implode('', taxonomy_node_form('forum', $node, $error)); + $output = implode('', taxonomy_node_form('forum', $node)); if ($node->nid) { // if editing, give option to leave shadows |