function diff_node_revisions_validate in Diff 7.3
Same name and namespace in other branches
- 5.2 diff.module \diff_node_revisions_validate()
- 5 diff.module \diff_node_revisions_validate()
- 6.2 diff.pages.inc \diff_node_revisions_validate()
- 6 diff.module \diff_node_revisions_validate()
- 7.2 diff.pages.inc \diff_node_revisions_validate()
Validation for input form to select two revisions.
File
- ./
diff.pages.inc, line 136 - Menu callbacks for hook_menu().
Code
function diff_node_revisions_validate($form, &$form_state) {
$old_vid = $form_state['values']['old'];
$new_vid = $form_state['values']['new'];
if ($old_vid == $new_vid || !$old_vid || !$new_vid) {
form_set_error('diff', t('Select different revisions to compare.'));
}
}