summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-01-19 17:55:54 +0000
committerDries Buytaert <dries@buytaert.net>2006-01-19 17:55:54 +0000
commit10d7f7731b0f955fd1cec7acb95051d656802b4e (patch)
tree31a2d2d6811cc31a305391311fd3e3cfcd2c428b
parent616544667f5c08a81ce915c531e644a286e3d88a (diff)
downloadbrdo-10d7f7731b0f955fd1cec7acb95051d656802b4e.tar.gz
brdo-10d7f7731b0f955fd1cec7acb95051d656802b4e.tar.bz2
- Patch #45281 by chx: made categories with forum topics work again.
-rw-r--r--modules/forum.module2
-rw-r--r--modules/forum/forum.module2
-rw-r--r--modules/taxonomy.module3
-rw-r--r--modules/taxonomy/taxonomy.module3
4 files changed, 4 insertions, 6 deletions
diff --git a/modules/forum.module b/modules/forum.module
index 890ff48c2..7db151472 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -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;
}
}
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 890ff48c2..7db151472 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -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;
}
}
diff --git a/modules/taxonomy.module b/modules/taxonomy.module
index 374bf6003..d7e27604a 100644
--- a/modules/taxonomy.module
+++ b/modules/taxonomy.module
@@ -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;
}
}
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 374bf6003..d7e27604a 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -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;
}
}