You are here

function patch_manager_node_actions_form_reverse_submit in Patch manager 6

Same name and namespace in other branches
  1. 7 patch_manager.module \patch_manager_node_actions_form_reverse_submit()

Reverse the patch in a node view context.

@todo Reduce code duplication.

1 string reference to 'patch_manager_node_actions_form_reverse_submit'
patch_manager_node_actions_form in ./patch_manager.module
Provide a form for nodes to perform simple actions.

File

./patch_manager.module, line 310
patch_manager.module Patch manager provides developers with tools for managing patches.

Code

function patch_manager_node_actions_form_reverse_submit($form, $form_state) {
  $result = patch_manager_runpatch($form['#node'], '-R');
  if ($result->status === PATCH_MANAGER_SUCCESS) {
    drupal_set_message(t('All parts of the patch were successfully reverted.'));
  }
  else {
    _patch_manager_display_errors($result);
  }
}