You are here

function diff_node_revisions_submit in Diff 6.2

Same name and namespace in other branches
  1. 5.2 diff.module \diff_node_revisions_submit()
  2. 5 diff.module \diff_node_revisions_submit()
  3. 6 diff.module \diff_node_revisions_submit()
  4. 7.3 diff.pages.inc \diff_node_revisions_submit()
  5. 7.2 diff.pages.inc \diff_node_revisions_submit()

Submit code for input form to select two revisions.

File

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

Code

function diff_node_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']);
  $form_state['redirect'] = 'node/' . $form_state['values']['nid'] . '/revisions/view/' . $old_vid . '/' . $new_vid;
}