You are here

function profile2_diff_latest in Profile 2 7.2

Menu callback - show latest diff for a given profile.

1 call to profile2_diff_latest()
profile2_diff_latest_by_user in contrib/profile2_diff.pages.inc
1 string reference to 'profile2_diff_latest'
profile2_diff_menu in contrib/profile2_diff.module
Implements hook_menu().

File

contrib/profile2_diff.pages.inc, line 18
Menu callbacks for hook_menu().

Code

function profile2_diff_latest($profile) {
  $revisions = profile2_revision_list($profile);
  $new = array_shift($revisions);
  $old = array_shift($revisions);
  $link_base = _profile2_revision_base_path($profile, TRUE);
  drupal_goto("{$link_base}/diff/{$old->vid}/{$new->vid}");
}