Index: modules/blog/blog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.module,v
retrieving revision 1.305
diff -u -p -r1.305 blog.module
--- modules/blog/blog.module	13 May 2008 18:15:07 -0000	1.305
+++ modules/blog/blog.module	17 May 2008 02:58:29 -0000
@@ -143,8 +143,7 @@ function blog_menu() {
     'title' => 'My blog',
     'page callback' => 'blog_page_user',
     'page arguments' => array(1),
-    'access callback' => 'blog_page_user_access',
-    'access arguments' => array(1),
+    'access arguments' => array('access content'),
   );
   $items['blog/%user/feed'] = array(
     'title' => 'Blogs',
Index: modules/blog/blog.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.pages.inc,v
retrieving revision 1.9
diff -u -p -r1.9 blog.pages.inc
--- modules/blog/blog.pages.inc	13 May 2008 18:15:07 -0000	1.9
+++ modules/blog/blog.pages.inc	17 May 2008 02:58:29 -0000
@@ -12,41 +12,46 @@
 function blog_page_user($account) {
   global $user;
 
-  drupal_set_title($title = t("@name's blog", array('@name' => $account->name)));
-
-  $items = array();
-
-  if (($account->uid == $user->uid) && user_access('create blog entries')) {
-    $items[] = l(t('Post new blog entry.'), "node/add/blog");
-  }
-  else if ($account->uid == $user->uid) {
-    $items[] = t('You are not allowed to post a new blog entry.');
-  }
-
-  $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);
-  $has_posts = FALSE;
-
-  while ($node = db_fetch_object($result)) {
-    $output .= node_view(node_load($node->nid), 1);
-    $has_posts = TRUE;
-  }
-
-  if ($has_posts) {
-    $output .= theme('pager', NULL, variable_get('default_nodes_main', 10));
-  }
-  else {
-    if ($account->uid == $user->uid) {
-      drupal_set_message(t('You have not created any blog entries.'));
+  if (_blog_post_exists($account) || user_access('create blog entries', $account)) {
+    drupal_set_title($title = t("@name's blog", array('@name' => $account->name)));
+  
+    $items = array();
+  
+    if (($account->uid == $user->uid) && user_access('create blog content')) {
+      $items[] = l(t('Post new blog entry.'), "node/add/blog");
+    }
+    else if ($account->uid == $user->uid) {
+      $items[] = t('You are not allowed to post a new blog entry.');
+    }
+  
+    $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);
+    $has_posts = FALSE;
+  
+    while ($node = db_fetch_object($result)) {
+      $output .= node_view(node_load($node->nid), 1);
+      $has_posts = TRUE;
+    }
+  
+    if ($has_posts) {
+      $output .= theme('pager', NULL, variable_get('default_nodes_main', 10));
     }
     else {
-      drupal_set_message(t('!author has not created any blog entries.', array('!author' => theme('username', $account))));
+      if ($account->uid == $user->uid) {
+        drupal_set_message(t('You have not created any blog entries.'));
+      }
+      else {
+        drupal_set_message(t('!author has not created any blog entries.', array('!author' => theme('username', $account))));
+      }
     }
+    drupal_add_feed(url('blog/' . $account->uid . '/feed'), t('RSS - !title', array('!title' => $title)));
+  
+    return $output;
+  }
+  else {
+    drupal_not_found();
   }
-  drupal_add_feed(url('blog/' . $account->uid . '/feed'), t('RSS - !title', array('!title' => $title)));
-
-  return $output;
 }
 
 /**
