function diff_node_revisions_submit in Diff 6
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()
- 7.3 diff.pages.inc \diff_node_revisions_submit()
- 7.2 diff.pages.inc \diff_node_revisions_submit()
Submit code for input form to select two revisions.
File
- ./
diff.module, line 207 - Provides functionality to show a diff between two node revisions.
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;
}