Index: modules/blog/blog.module =================================================================== RCS file: /cvs/drupal/drupal/modules/blog/blog.module,v retrieving revision 1.280 diff -u -p -r1.280 blog.module --- modules/blog/blog.module 30 Apr 2007 17:03:23 -0000 1.280 +++ modules/blog/blog.module 9 May 2007 19:03:54 -0000 @@ -151,9 +151,15 @@ function blog_page_user($uid) { } $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)));