function diff_node_revisions_submit in Diff 7.3
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.2 diff.pages.inc \diff_node_revisions_submit()
Submit code for input form to select two revisions.
File
- ./
diff.pages.inc, line 147 - 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']);
if (isset($_GET['destination'])) {
unset($_GET['destination']);
}
$form_state['redirect'] = 'node/' . $form_state['values']['nid'] . '/revisions/view/' . $old_vid . '/' . $new_vid;
}