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

4.7.x
Dries Buytaert 2006-01-19 17:55:54 +00:00
parent 616544667f
commit 10d7f7731b
4 changed files with 4 additions and 6 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}