diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-03-01 20:43:59 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-03-01 20:43:59 +0000 |
commit | c77153f19a2eb795e67a0b361aef859d9a2abe42 (patch) | |
tree | cf265041794501c3777b58c1442ca6f3bc5935ba | |
parent | 456fd7cc85d39b5905b37ba27b6fe588cc4432fe (diff) | |
download | brdo-c77153f19a2eb795e67a0b361aef859d9a2abe42.tar.gz brdo-c77153f19a2eb795e67a0b361aef859d9a2abe42.tar.bz2 |
- Removed dumb taxonomy block (based on DrupalCon feedback).
-rw-r--r-- | modules/taxonomy.module | 23 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 23 |
2 files changed, 0 insertions, 46 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 20b0939db..36f68efeb 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -92,29 +92,6 @@ function taxonomy_menu($may_cache) { return $items; } -/** - * Implementation of hook_block(). - * - * Generates a block with all categories. - */ -function taxonomy_block($op = 'list', $delta = 0) { - if ($op == 'list') { - $blocks[0]['info'] = t('Categories'); - return $blocks; - } - else if ($op == 'view' && user_access('access content')) { - $result = db_query(db_rewrite_sql('SELECT d.tid, d.name, MAX(n.created) AS updated, COUNT(*) AS count FROM {term_data} d INNER JOIN {term_node} USING (tid) INNER JOIN {node} n USING (nid) WHERE n.status = 1 GROUP BY d.tid, d.name ORDER BY updated DESC, d.name')); - $items = array(); - while ($category = db_fetch_object($result)) { - $items[] = l($category->name .' ('. $category->count .')', 'taxonomy/term/'. $category->tid) .'<br />'. t('%time ago', array('%time' => format_interval(time() - $category->updated))); - } - - $block['subject'] = t('Categories'); - $block['content'] = theme('item_list', $items); - return $block; - } -} - function taxonomy_form_vocabulary($edit = array()) { foreach (array_merge(node_list(), $edit['nodes']) as $type) { $node_type = node_invoke($type, 'node_name'); diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 20b0939db..36f68efeb 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -92,29 +92,6 @@ function taxonomy_menu($may_cache) { return $items; } -/** - * Implementation of hook_block(). - * - * Generates a block with all categories. - */ -function taxonomy_block($op = 'list', $delta = 0) { - if ($op == 'list') { - $blocks[0]['info'] = t('Categories'); - return $blocks; - } - else if ($op == 'view' && user_access('access content')) { - $result = db_query(db_rewrite_sql('SELECT d.tid, d.name, MAX(n.created) AS updated, COUNT(*) AS count FROM {term_data} d INNER JOIN {term_node} USING (tid) INNER JOIN {node} n USING (nid) WHERE n.status = 1 GROUP BY d.tid, d.name ORDER BY updated DESC, d.name')); - $items = array(); - while ($category = db_fetch_object($result)) { - $items[] = l($category->name .' ('. $category->count .')', 'taxonomy/term/'. $category->tid) .'<br />'. t('%time ago', array('%time' => format_interval(time() - $category->updated))); - } - - $block['subject'] = t('Categories'); - $block['content'] = theme('item_list', $items); - return $block; - } -} - function taxonomy_form_vocabulary($edit = array()) { foreach (array_merge(node_list(), $edit['nodes']) as $type) { $node_type = node_invoke($type, 'node_name'); |