You are here

function diff_node_revisions_validate in Diff 7.3

Same name and namespace in other branches
  1. 5.2 diff.module \diff_node_revisions_validate()
  2. 5 diff.module \diff_node_revisions_validate()
  3. 6.2 diff.pages.inc \diff_node_revisions_validate()
  4. 6 diff.module \diff_node_revisions_validate()
  5. 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.'));
  }
}