summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/taxonomy.module23
-rw-r--r--modules/taxonomy/taxonomy.module23
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');