diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2003-03-10 14:07:14 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2003-03-10 14:07:14 +0000 |
commit | 5689a9852948a68c689c64e1cd48b690871d6072 (patch) | |
tree | 3a6d3895c683a6474f2d5cd61c20ef2db9b51ba4 /modules/taxonomy/taxonomy.module | |
parent | b5ba5e22e129bd488160d3a6a12be8f47597b4a5 (diff) | |
download | brdo-5689a9852948a68c689c64e1cd48b690871d6072.tar.gz brdo-5689a9852948a68c689c64e1cd48b690871d6072.tar.bz2 |
- 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.
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index e22c8d8d3..a6374b929 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/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); |