Index: modules/blog/blog.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/blog/blog.pages.inc,v retrieving revision 1.1 diff -u -p -r1.1 blog.pages.inc --- modules/blog/blog.pages.inc 22 Jul 2007 06:48:25 -0000 1.1 +++ modules/blog/blog.pages.inc 1 Oct 2007 06:52:08 -0000 @@ -32,9 +32,15 @@ function blog_page_user($account) { } $result = pager_query(db_rewrite_sql("SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.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)));