Commit 2ea6ad44 authored by Dries's avatar Dries

- Fixed the taxonomy title of taxonomy pages.  Patch by Moshe.
parent 223d1bad
...@@ -688,9 +688,10 @@ function taxonomy_select_nodes($taxonomy, $pager = 1) { ...@@ -688,9 +688,10 @@ function taxonomy_select_nodes($taxonomy, $pager = 1) {
function taxonomy_render_nodes($result) { function taxonomy_render_nodes($result) {
while ($node = db_fetch_object($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) { function taxonomy_nodeapi($node, $op, $arg = 0) {
...@@ -722,9 +723,13 @@ function taxonomy_page() { ...@@ -722,9 +723,13 @@ function taxonomy_page() {
taxonomy_feed($taxonomy); taxonomy_feed($taxonomy);
break; break;
default: default:
print theme("header"); $sql = 'SELECT name FROM term_data WHERE tid IN (%s)';
taxonomy_render_nodes(taxonomy_select_nodes($taxonomy)); $result = db_query($sql, $taxonomy->str_tids);
print theme("footer"); while ($term = db_fetch_object($result)) {
$names[] = $term->name;
}
$output = taxonomy_render_nodes(taxonomy_select_nodes($taxonomy));
print theme("page", $output, implode(', ', $names));
break; break;
} }
} }
......
...@@ -688,9 +688,10 @@ function taxonomy_select_nodes($taxonomy, $pager = 1) { ...@@ -688,9 +688,10 @@ function taxonomy_select_nodes($taxonomy, $pager = 1) {
function taxonomy_render_nodes($result) { function taxonomy_render_nodes($result) {
while ($node = db_fetch_object($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) { function taxonomy_nodeapi($node, $op, $arg = 0) {
...@@ -722,9 +723,13 @@ function taxonomy_page() { ...@@ -722,9 +723,13 @@ function taxonomy_page() {
taxonomy_feed($taxonomy); taxonomy_feed($taxonomy);
break; break;
default: default:
print theme("header"); $sql = 'SELECT name FROM term_data WHERE tid IN (%s)';
taxonomy_render_nodes(taxonomy_select_nodes($taxonomy)); $result = db_query($sql, $taxonomy->str_tids);
print theme("footer"); while ($term = db_fetch_object($result)) {
$names[] = $term->name;
}
$output = taxonomy_render_nodes(taxonomy_select_nodes($taxonomy));
print theme("page", $output, implode(', ', $names));
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment