From 5689a9852948a68c689c64e1cd48b690871d6072 Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Mon, 10 Mar 2003 14:07:14 +0000 Subject: - Fixed bug #1298 : Taxonomy: Edit term doesn't show parent and related terms. - Added feature #1299 : Order of related terms and parent in taxonomy admin. --- modules/taxonomy.module | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'modules/taxonomy.module') diff --git a/modules/taxonomy.module b/modules/taxonomy.module index e22c8d8d3..a6374b929 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -134,20 +134,12 @@ function _taxonomy_confirm_del_vocabulary($vid) { } function taxonomy_form_term($edit = array()) { - $vocabulary_id = arg(3); - - if (!$vocabulary_id) { - $vocabulary_id = $edit["vid"]; - } + $vocabulary_id = isset($edit["vid"]) ? $edit["vid"] : arg(3); $vocabulary = taxonomy_get_vocabulary($vocabulary_id); $form = form_textfield(t("Term name"), "name", $edit["name"], 50, 64, t("Required") . ". " . t("The name for this term. Example: 'Linux'.")); $form .= form_textarea(t("Description"), "description", $edit["description"], 60, 5, t("Optional") . ". " . t("A description of the term.")); - if ($vocabulary->relations) { - $form .= _taxonomy_term_select(t("Related terms"), "relations", array_keys(taxonomy_get_related($edit["tid"])), $vocabulary_id, t("Optional") . ". ", 1, "<" . t("none") . ">", array($edit["tid"])); - } - if ($vocabulary->hierarchy) { $parent = array_keys(taxonomy_get_parents($edit["tid"])); $children = taxonomy_get_tree($vocabulary_id, $edit["tid"]); @@ -166,6 +158,10 @@ function taxonomy_form_term($edit = array()) { } } + if ($vocabulary->relations) { + $form .= _taxonomy_term_select(t("Related terms"), "relations", array_keys(taxonomy_get_related($edit["tid"])), $vocabulary_id, t("Optional") . ". ", 1, "<" . t("none") . ">", array($edit["tid"])); + } + $form .= form_textarea(t("Synonyms"), "synonyms", implode("\n", taxonomy_get_synonyms($edit["tid"])), 30, 5, t("Optional") . ". ". t(l("Synonyms", "admin/taxonomy/help#synonyms") ." of this term, one synonym per line.")); $form .= form_weight(t("Weight"), "weight", $edit["weight"], 10, t("Optional. In listings, the heavier terms will sink and the lighter terms will be positioned nearer the top.")); $form .= form_hidden("vid", $vocabulary->vid); -- cgit v1.2.3