function profile2_diff_profile2_revisions_submit in Profile 2 7.2
Submit code for input form to select two revisions.
File
- contrib/
profile2_diff.pages.inc, line 123 - Menu callbacks for hook_menu().
Code
function profile2_diff_profile2_revisions_submit($form, &$form_state) {
// the ids are ordered so the old revision is always on the left
$old_vid = min($form_state['values']['old'], $form_state['values']['new']);
$new_vid = max($form_state['values']['old'], $form_state['values']['new']);
$link_base = _profile2_revision_base_path($form_state['values']['profile'], TRUE);
$form_state['redirect'] = "{$link_base}/diff/{$old_vid}/{$new_vid}";
}