function diff_node_revisions_submit in Diff 7.2
Same name and namespace in other branches
- 5.2 diff.module \diff_node_revisions_submit()
- 5 diff.module \diff_node_revisions_submit()
- 6.2 diff.pages.inc \diff_node_revisions_submit()
- 6 diff.module \diff_node_revisions_submit()
- 7.3 diff.pages.inc \diff_node_revisions_submit()
Submit code for input form to select two revisions.
File
- ./
diff.pages.inc, line 128 - 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;
}