diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-10-14 20:22:04 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-10-14 20:22:04 +0000 |
commit | 361359527594f0d1fae88d9f02cab7e07b030956 (patch) | |
tree | 5e94fa5c62a4a57602e969e1574ef4d9888bdffd /modules/taxonomy/taxonomy.admin.inc | |
parent | a243e821fa8c19f5cdaae5af0495fcccdda70125 (diff) | |
download | brdo-361359527594f0d1fae88d9f02cab7e07b030956.tar.gz brdo-361359527594f0d1fae88d9f02cab7e07b030956.tar.bz2 |
- Patch #603702 by Xano: remove _taxonomy_term_select().
Diffstat (limited to 'modules/taxonomy/taxonomy.admin.inc')
-rw-r--r-- | modules/taxonomy/taxonomy.admin.inc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc index dd9f9fc56..be5b9179e 100644 --- a/modules/taxonomy/taxonomy.admin.inc +++ b/modules/taxonomy/taxonomy.admin.inc @@ -670,7 +670,21 @@ function taxonomy_form_term($form, &$form_state, $vocabulary, $edit = array()) { } $exclude[] = $edit['tid']; - $form['advanced']['parent'] = _taxonomy_term_select(t('Parents'), $parent, $vocabulary->vid, t('Parent terms') . '.', '<' . t('root') . '>', $exclude); + $tree = taxonomy_get_tree($vocabulary->vid); + $options = array('<' . t('root') . '>'); + foreach ($tree as $term) { + if (!in_array($term->tid, $exclude)) { + $options[$term->tid] = str_repeat('-', $term->depth) . $term->name; + } + } + $form['advanced']['parent'] = array( + '#type' => 'select', + '#title' => t('Parent terms'), + '#options' => $options, + '#default_value' => $parent, + '#multiple' => TRUE, + ); + } $form['advanced']['synonyms'] = array( '#type' => 'textarea', |