diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-04-12 19:18:57 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-04-12 19:18:57 +0000 |
commit | dea2bd212325e640cebba29a9d6440d43ebcb01f (patch) | |
tree | ac45efb75a0db916133cee0c63fb8ab23873de52 /modules/taxonomy/taxonomy.module | |
parent | c9c947619f8886f4aac2dc05cd7d85fc98aa25ba (diff) | |
download | brdo-dea2bd212325e640cebba29a9d6440d43ebcb01f.tar.gz brdo-dea2bd212325e640cebba29a9d6440d43ebcb01f.tar.bz2 |
- Modified patch by mikeryan: make it possible to administer system vocabularies.
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 12d28dc18..19528d167 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -366,30 +366,28 @@ function taxonomy_overview() { $header = array(t('Name'), t('Type'), array('data' => t('Operations'), 'colspan' => '3')); $vocabularies = taxonomy_get_vocabularies(); foreach ($vocabularies as $vocabulary) { - if ($vocabulary->module == 'taxonomy') { - $types = array(); - foreach ($vocabulary->nodes as $type) { - $node_type = node_invoke($type, 'node_name'); - $types[] = $node_type ? $node_type : $type; - } - $rows[] = array('<strong>'.check_plain($vocabulary->name).'</strong>', implode(', ', $types), l(t('edit vocabulary'), "admin/taxonomy/edit/vocabulary/$vocabulary->vid"), l(t('add term'), "admin/taxonomy/add/term/$vocabulary->vid"), l(t('view terms'), "admin/taxonomy/$vocabulary->vid")); - - // Show terms if non-free. - if (!$vocabulary->tags) { - $tree = taxonomy_get_tree($vocabulary->vid); - if ($tree) { - foreach ($tree as $term) { - $rows[] = array(array('data' => _taxonomy_depth($term->depth) . ' ' . check_plain($term->name), 'class' => 'term'), NULL, NULL, NULL, l(t('edit term'), "admin/taxonomy/edit/term/$term->tid")); - } - } - else { - $rows[] = array(array('data' => t('No terms available.'), 'colspan' => '5', 'class' => 'message')); + $types = array(); + foreach ($vocabulary->nodes as $type) { + $node_type = node_invoke($type, 'node_name'); + $types[] = $node_type ? $node_type : $type; + } + $rows[] = array('<strong>'.check_plain($vocabulary->name).'</strong>', implode(', ', $types), l(t('edit vocabulary'), "admin/taxonomy/edit/vocabulary/$vocabulary->vid"), l(t('add term'), "admin/taxonomy/add/term/$vocabulary->vid"), l(t('view terms'), "admin/taxonomy/$vocabulary->vid")); + + // Show terms if non-free. + if (!$vocabulary->tags) { + $tree = taxonomy_get_tree($vocabulary->vid); + if ($tree) { + foreach ($tree as $term) { + $rows[] = array(array('data' => _taxonomy_depth($term->depth) . ' ' . check_plain($term->name), 'class' => 'term'), NULL, NULL, NULL, l(t('edit term'), "admin/taxonomy/edit/term/$term->tid")); } } - elseif ($vocabulary->tags) { - $rows[] = array(array('data' => t('This is a free tagging vocabulary:') . ' ' . l(t('view terms'), "admin/taxonomy/$vocabulary->vid") . '.', 'colspan' => '5', 'class' => 'message')); + else { + $rows[] = array(array('data' => t('No terms available.'), 'colspan' => '5', 'class' => 'message')); } } + elseif ($vocabulary->tags) { + $rows[] = array(array('data' => t('This is a free tagging vocabulary:') . ' ' . l(t('view terms'), "admin/taxonomy/$vocabulary->vid") . '.', 'colspan' => '5', 'class' => 'message')); + } } if (!$rows) { |