Commit 5595bc79 authored by Steven Wittens's avatar Steven Wittens
Browse files

#10279: Adding a note to taxonomy_render_nodes when there are no nodes to...

#10279: Adding a note to taxonomy_render_nodes when there are no nodes to show, rather than showing an empty page.
parent 318ce81a
......@@ -805,11 +805,15 @@ function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $p
* taxonomy_select_nodes(), and formats each node along with a pager.
*/
function taxonomy_render_nodes($result) {
if (db_num_rows($result) > 0) {
while ($node = db_fetch_object($result)) {
$output .= node_view(node_load(array('nid' => $node->nid)), 1);
}
$output .= theme('pager', NULL, variable_get('default_nodes_main', 10), 0);
}
else {
$output .= t('There are currently no posts in this category.');
}
return $output;
}
......
......@@ -805,11 +805,15 @@ function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $p
* taxonomy_select_nodes(), and formats each node along with a pager.
*/
function taxonomy_render_nodes($result) {
if (db_num_rows($result) > 0) {
while ($node = db_fetch_object($result)) {
$output .= node_view(node_load(array('nid' => $node->nid)), 1);
}
$output .= theme('pager', NULL, variable_get('default_nodes_main', 10), 0);
}
else {
$output .= t('There are currently no posts in this category.');
}
return $output;
}
......
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