You are here

function diff_latest in Diff 7.2

Same name and namespace in other branches
  1. 5.2 diff.module \diff_latest()
  2. 6.2 diff.pages.inc \diff_latest()
  3. 7.3 diff.pages.inc \diff_latest()

Menu callback - show latest diff for a given node.

1 string reference to 'diff_latest'
diff_menu in ./diff.module
Implements hook_menu().

File

./diff.pages.inc, line 12
Menu callbacks for hook_menu().

Code

function diff_latest($node) {
  $revisions = node_revision_list($node);
  $new = array_shift($revisions);
  $old = array_shift($revisions);
  drupal_goto("node/{$node->nid}/revisions/view/{$old->vid}/{$new->vid}");
}