You are here

function revisioning_revisions_summary_submit in Revisioning 7

Same name and namespace in other branches
  1. 8 revisioning_theme.inc \revisioning_revisions_summary_submit()
  2. 6.4 revisioning_theme.inc \revisioning_revisions_summary_submit()
  3. 6.3 revisioning_theme.inc \revisioning_revisions_summary_submit()

Submit two selected revisions to Diff module.

Parameters

array $form: The form

array $form_state: the form state

File

./revisioning_theme.inc, line 164
Include file for revisioning.module; deals with all theming aspects.

Code

function revisioning_revisions_summary_submit($form, &$form_state) {
  $selected_vids = $form_state['values']['tickbox'];
  $vid1 = key($selected_vids);
  next($selected_vids);
  $vid2 = key($selected_vids);

  // Clear existing msgs.
  drupal_get_messages();
  revisioning_set_status_message(t('Comparing revision #!revision2 against revision #!revision1', array(
    '!revision2' => $vid2,
    '!revision1' => $vid1,
  )));
  $nid = $form_state['values']['nid'];
  $form_state['redirect'] = "node/{$nid}/revisions/view/{$vid2}/{$vid1}";
}