You are here

function revisioning_revisions_summary_submit in Revisioning 6.3

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. 7 revisioning_theme.inc \revisioning_revisions_summary_submit()

Submit two selected revisions to Diff module.

_state

Parameters

$form:

Return value

void

File

./revisioning_theme.inc, line 124
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);
  drupal_get_messages();

  // clear existing msgs
  drupal_set_message(t('Comparing revision #!revision2 against revision #!revision1', array(
    '!revision2' => $vid2,
    '!revision1' => $vid1,
  )));
  $destination = '';
  if (isset($_REQUEST['destination'])) {
    $destination = drupal_get_destination();
    unset($_REQUEST['destination']);
  }
  $nid = $form_state['values']['nid'];
  $form_state['redirect'] = array(
    "node/{$nid}/revisions/view/{$vid2}/{$vid1}",
    $destination,
  );
}