Index: revision_moderation.module
===================================================================
RCS file: /var/lib/cvs/drupal-newspaq/modules/contrib/revision_moderation/revision_moderation.module,v
retrieving revision 1.1
diff -u -5 -p -u -r1.1 revision_moderation.module
--- revision_moderation.module	22 Sep 2008 12:20:24 -0000	1.1
+++ revision_moderation.module	23 Sep 2008 10:46:41 -0000
@@ -179,11 +179,11 @@ function revision_moderation_nodeapi(&$n
   switch ($op) {
     case 'insert':
       // Store revision moderation setting of this node.
       drupal_write_record('revision_moderation', $node);
       break;
-   
+
     case 'update':
       // Update revision moderation setting of this node.
       drupal_write_record('revision_moderation', $node, 'nid');
       break;
 
@@ -203,25 +203,35 @@ function revision_moderation_nodeapi(&$n
       $access_delete = user_access('delete revisions');
       // Display more descriptive message at the top of node revision views, including operations
       // that the current user has available to them.
       $current_vid = db_result(db_query('SELECT vid FROM {node} WHERE nid = %d', $node->nid));
       if ($node->vid != $current_vid) {
-        drupal_set_message(t('You are currently viewing a revision of this post created on @date by @author.', array('@date' => format_date($node->changed, 'small'), '@author' => $node->name)));
+        $links = array(); // Array of links to show along with the message.
+        if (module_exists('diff')) {
+          if ($node->vid > $current_vid) {
+            $difflink = "node/$node->nid/revisions/view/$current_vid/$node->vid";
+          }
+          else {
+            $difflink = "node/$node->nid/revisions/view/$node->vid/$current_vid";
+          }
+          $links[] = l(t('Compare revisions'), $difflink);
+        }
         if ($access_update) {
-          drupal_set_message(l(t('Edit revision'), "node/$node->nid/revisions/$node->vid/edit"));
+          $links[] = l(t('Edit revision'), "node/$node->nid/revisions/$node->vid/edit");
           // If this revision is old, show an option to revert to it.
           // Otherwise, show an option to publish it.
           if ($node->vid < $current_vid) {
-            drupal_set_message(l(t('Revert to revision'), "node/$node->nid/revisions/$node->vid/revert"));
+            $links[] = l(t('Revert to revision'), "node/$node->nid/revisions/$node->vid/revert");
           }
           else {
-            drupal_set_message(l(t('Publish revision'), "node/$node->nid/revisions/$node->vid/publish"));
+            $links[] = l(t('Publish revision'), "node/$node->nid/revisions/$node->vid/publish");
           }
         }
         if ($access_delete) {
-          drupal_set_message(l(t('Delete revision'), "node/$node->nid/revisions/$node->vid/delete"));
+          $links[] = l(t('Delete revision'), "node/$node->nid/revisions/$node->vid/delete");
         }
+        drupal_set_message(t('You are currently viewing a revision of this post created on @date by @author.', array('@date' => format_date($node->changed, 'small'), '@author' => $node->name)) . theme_item_list($links));
       }
       elseif ($node->revision_moderation == 1 && empty($teaser)) {
         // Notify admin if a node has pending revisions.
         if ($access_update && arg(2) != 'revisions' && revision_moderation_get_node_pending_revisions($node->nid)) {
           drupal_set_message(t('This post has one or more pending revisions: <a href="@list">view list of revisions</a>.', array('@list' => url("node/$node->nid/revisions"))));
@@ -293,11 +303,11 @@ function revision_moderation_block($op =
         $output .= '<p>'. l(t('View all pending revisions'), 'admin/content/node/revisions') .'</p>';
       }
       else {
         $output .= t('No pending revisions found.');
       }
-  
+
       $block['subject'] = t('Pending revisions');
       $block['content'] = $output;
     }
 
     return $block;
