--- blog.cvs/blog.module 2007-05-01 17:37:51.000000000 +1000 +++ blog/blog.module 2007-05-01 17:37:27.000000000 +1000 @@ -148,9 +148,16 @@ } $result = pager_query(db_rewrite_sql("SELECT n.nid, n.sticky, n.created FROM {node} n WHERE type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC"), variable_get('default_nodes_main', 10), 0, NULL, $account->uid); - while ($node = db_fetch_object($result)) { - $output .= node_view(node_load($node->nid), 1); + + if (db_num_rows($result) > 0) { + while ($node = db_fetch_object($result)) { + $output .= node_view(node_load($node->nid), 1); + } + } + else { + $output .= '
'.t('%name has not yet made any blog posts.', array ('%name' => $account->name) ).'
'; } + $output .= theme('pager', NULL, variable_get('default_nodes_main', 10)); drupal_add_feed(url('blog/'. $account->uid .'/feed'), t('RSS - !title', array('!title' => $title))); @@ -289,3 +296,6 @@ } } } + + +