You are here

function diff_latest in Diff 5.2

Same name and namespace in other branches
  1. 6.2 diff.pages.inc \diff_latest()
  2. 7.3 diff.pages.inc \diff_latest()
  3. 7.2 diff.pages.inc \diff_latest()
1 string reference to 'diff_latest'
diff_menu in ./diff.module
Implementation of hook_menu() The menu path 'node/$nid/revisions' is overriden with 'diff_diffs'.

File

./diff.module, line 69

Code

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