diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-12-07 10:29:43 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-12-07 10:29:43 +0000 |
commit | 2ea6ad44a55eef096376ebf625a402a38ac0c698 (patch) | |
tree | 6929f6921132e21115b44df8a4fceba7b023d385 /modules | |
parent | 223d1bad9b3d37f0533ca454a475c39c276108c3 (diff) | |
download | brdo-2ea6ad44a55eef096376ebf625a402a38ac0c698.tar.gz brdo-2ea6ad44a55eef096376ebf625a402a38ac0c698.tar.bz2 |
- Fixed the taxonomy title of taxonomy pages. Patch by Moshe.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/taxonomy.module | 15 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 15 |
2 files changed, 20 insertions, 10 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index dc4c7d6d8..74a1848c9 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -688,9 +688,10 @@ function taxonomy_select_nodes($taxonomy, $pager = 1) { function taxonomy_render_nodes($result) { while ($node = db_fetch_object($result)) { - print node_view(node_load(array("nid" => $node->nid, "type" => $node->type)), 1); + $output .= node_view(node_load(array("nid" => $node->nid, "type" => $node->type)), 1); } - print pager_display(NULL, variable_get("default_nodes_main", 10), 0); + $output .= pager_display(NULL, variable_get("default_nodes_main", 10), 0); + return $output; } function taxonomy_nodeapi($node, $op, $arg = 0) { @@ -722,9 +723,13 @@ function taxonomy_page() { taxonomy_feed($taxonomy); break; default: - print theme("header"); - taxonomy_render_nodes(taxonomy_select_nodes($taxonomy)); - print theme("footer"); + $sql = 'SELECT name FROM term_data WHERE tid IN (%s)'; + $result = db_query($sql, $taxonomy->str_tids); + while ($term = db_fetch_object($result)) { + $names[] = $term->name; + } + $output = taxonomy_render_nodes(taxonomy_select_nodes($taxonomy)); + print theme("page", $output, implode(', ', $names)); break; } } diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index dc4c7d6d8..74a1848c9 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -688,9 +688,10 @@ function taxonomy_select_nodes($taxonomy, $pager = 1) { function taxonomy_render_nodes($result) { while ($node = db_fetch_object($result)) { - print node_view(node_load(array("nid" => $node->nid, "type" => $node->type)), 1); + $output .= node_view(node_load(array("nid" => $node->nid, "type" => $node->type)), 1); } - print pager_display(NULL, variable_get("default_nodes_main", 10), 0); + $output .= pager_display(NULL, variable_get("default_nodes_main", 10), 0); + return $output; } function taxonomy_nodeapi($node, $op, $arg = 0) { @@ -722,9 +723,13 @@ function taxonomy_page() { taxonomy_feed($taxonomy); break; default: - print theme("header"); - taxonomy_render_nodes(taxonomy_select_nodes($taxonomy)); - print theme("footer"); + $sql = 'SELECT name FROM term_data WHERE tid IN (%s)'; + $result = db_query($sql, $taxonomy->str_tids); + while ($term = db_fetch_object($result)) { + $names[] = $term->name; + } + $output = taxonomy_render_nodes(taxonomy_select_nodes($taxonomy)); + print theme("page", $output, implode(', ', $names)); break; } } |