Index: modules/blog/blog.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/blog/blog.pages.inc,v retrieving revision 1.3 diff -u -r1.3 blog.pages.inc --- modules/blog/blog.pages.inc 25 Oct 2007 17:44:38 -0000 1.3 +++ modules/blog/blog.pages.inc 3 Nov 2007 07:23:46 -0000 @@ -26,10 +26,22 @@ $output = theme('item_list', $items); $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); + $num_rows = FALSE; while ($node = db_fetch_object($result)) { $output .= node_view(node_load($node->nid), 1); + $num_rows = TRUE; + } + if ($num_rows) { + $output .= theme('pager', NULL, variable_get('default_nodes_main', 10)); + } + else { + if ($account->uid == $user->uid) { + drupal_set_message(t('You have not made any blog posts.'), 'status'); + } + else { + drupal_set_message(t('!author has not yet made any blog posts.', array('!author' => theme('username', $account))), 'status'); + } } - $output .= theme('pager', NULL, variable_get('default_nodes_main', 10)); drupal_add_feed(url('blog/'. $account->uid .'/feed'), t('RSS - !title', array('!title' => $title))); return $output;