Commit 10d7f773 authored by Dries's avatar Dries

- Patch #45281 by chx: made categories with forum topics work again.

parent 61654466
......@@ -604,7 +604,7 @@ function forum_form(&$node) {
function forum_prepare(&$node) {
if (!$node->nid) {
// new topic
$node->taxonomy[] = arg(3);
$node->taxonomy[arg(3)] = 1;
}
}
......
......@@ -604,7 +604,7 @@ function forum_form(&$node) {
function forum_prepare(&$node) {
if (!$node->nid) {
// new topic
$node->taxonomy[] = arg(3);
$node->taxonomy[arg(3)] = 1;
}
}
......
......@@ -531,8 +531,7 @@ function taxonomy_form_alter($form_id, &$form) {
$form['taxonomy']['tags'][$vocabulary->vid] = array('#type' => 'textfield', '#default_value' => $typed_string, '#maxlength' => 100, '#autocomplete_path' => 'taxonomy/autocomplete/'. $vocabulary->vid, '#required' => $vocabulary->required, '#title' => $vocabulary->name, '#description' => $help);
}
else {
$ntterms = isset($node->taxonomy) ? $terms : array_keys($terms);
$form['taxonomy'][$vocabulary->vid] = taxonomy_form($vocabulary->vid, $ntterms, $help, 'taxonomy');
$form['taxonomy'][$vocabulary->vid] = taxonomy_form($vocabulary->vid, array_keys($terms), $help);
$form['taxonomy'][$vocabulary->vid]['#weight'] = $vocabulary->weight;
}
}
......
......@@ -531,8 +531,7 @@ function taxonomy_form_alter($form_id, &$form) {
$form['taxonomy']['tags'][$vocabulary->vid] = array('#type' => 'textfield', '#default_value' => $typed_string, '#maxlength' => 100, '#autocomplete_path' => 'taxonomy/autocomplete/'. $vocabulary->vid, '#required' => $vocabulary->required, '#title' => $vocabulary->name, '#description' => $help);
}
else {
$ntterms = isset($node->taxonomy) ? $terms : array_keys($terms);
$form['taxonomy'][$vocabulary->vid] = taxonomy_form($vocabulary->vid, $ntterms, $help, 'taxonomy');
$form['taxonomy'][$vocabulary->vid] = taxonomy_form($vocabulary->vid, array_keys($terms), $help);
$form['taxonomy'][$vocabulary->vid]['#weight'] = $vocabulary->weight;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment