--- comment.module~	2005-03-20 16:00:02.000000000 -0500
+++ comment.module	2005-03-30 20:53:26.000000000 -0500
@@ -161,9 +161,10 @@
 function comment_block($op = 'list', $delta = 0) {
   if ($op == 'list') {
     $blocks[0]['info'] = t('Recent comments');
+    $blocks[1]['info'] = t('Pending comments');
     return $blocks;
   }
-  else if ($op == 'view' && user_access('access comments')) {
+  else if ($op == 'view' && user_access('access comments') && 0 == $delta) {
     $result = db_query_range(db_rewrite_sql('SELECT c.nid, c.* FROM {comments} c WHERE c.status = 0 ORDER BY c.timestamp DESC', 'c'), 0, 10);
     $items = array();
     while ($comment = db_fetch_object($result)) {
@@ -174,6 +175,18 @@
     $block['content'] = theme('item_list', $items);
     return $block;
   }
+  // block listing comments pending moderation
+  else if ($op == 'view' && user_access('moderate comments') && 1 == $delta) {
+    $result = db_query_range(db_rewrite_sql('SELECT c.nid, c.* FROM {comments} c WHERE c.status = 1 ORDER BY c.timestamp DESC', 'c'), 0, 10);
+    $items = array();
+    while ($comment = db_fetch_object($result)) {
+      $items[] = l($comment->subject, "admin/comment/edit/$comment->cid", NULL, NULL, NULL) .'<br />'. t('%time ago', array('%time' => format_interval(time() - $comment->timestamp)));
+    }
+
+    $block['subject'] = t('Pending comments');
+    $block['content'] = theme('item_list', $items);
+    return $block;
+  }
 }
 
 /**
