You are here

function diff_node_revisions_validate in Diff 5.2

Same name and namespace in other branches
  1. 5 diff.module \diff_node_revisions_validate()
  2. 6.2 diff.pages.inc \diff_node_revisions_validate()
  3. 6 diff.module \diff_node_revisions_validate()
  4. 7.3 diff.pages.inc \diff_node_revisions_validate()
  5. 7.2 diff.pages.inc \diff_node_revisions_validate()

Validation for input form to select two revisions.

File

./diff.module, line 291

Code

function diff_node_revisions_validate($form_id, $form_values) {
  $old_vid = $form_values['old'];
  $new_vid = $form_values['new'];
  if ($old_vid == $new_vid || !$old_vid || !$new_vid) {
    form_set_error('diff', t('Select different revisions to compare.'));
  }
}