You are here

function revisioning_publish_confirm_submit in Revisioning 6.3

Same name and namespace in other branches
  1. 8 revisioning.pages.inc \revisioning_publish_confirm_submit()
  2. 6.4 revisioning.pages.inc \revisioning_publish_confirm_submit()
  3. 6 revisioning.module \revisioning_publish_confirm_submit()
  4. 7 revisioning.pages.inc \revisioning_publish_confirm_submit()

Submission handler for the publish_confirm form.

File

./revisioning.pages.inc, line 108
Rendering and altering of pages and forms used by Revisioning

Code

function revisioning_publish_confirm_submit($form, &$form_state) {
  $nid = $form_state['values']['node_id'];
  $vid = $form_state['values']['revision'];
  _revisioning_publish_revision($nid, $vid);
  drupal_set_message(t('Revision has been published.'));

  // [#886384]
  global $base_url;
  $url = $base_url . '/' . drupal_get_path_alias('node/' . $nid);
  cache_clear_all($url, 'cache_page');

  // Redirect to the same page as unpublish and revert
  $form_state['redirect'] = "node/{$nid}/revisions";
}