function _revisioning_form_submit in Revisioning 8
Same name and namespace in other branches
- 6.4 revisioning.pages.inc \_revisioning_form_submit()
- 6.3 revisioning.pages.inc \_revisioning_form_submit()
- 7 revisioning.pages.inc \_revisioning_form_submit()
Handler for the 'Save' button on the edit form.
When saving a new revision we shouldn't redirect to "View current", as that's not the one we've saved.
1 string reference to '_revisioning_form_submit'
- revisioning_form_alter in ./
revisioning.pages.inc - Implements hook_form_alter().
File
- ./
revisioning.pages.inc, line 336 - Rendering and altering of pages and forms used by Revisioning.
Code
function _revisioning_form_submit($form, &$form_state) {
// Don't redirect when creating new node, when not moderated or user doesn't
// have access to the revision.
if (isset($form_state['node']->nid) && !empty($form_state['node']->revision_moderation) && _revisioning_access_node_revision('view revisions', $form_state['node'])) {
$form_state['redirect'] = 'node/' . $form_state['node']->nid . '/revisions/' . $form_state['node']->vid . '/view';
}
}