You are here

function patch_manager_node_actions_form_apply_submit in Patch manager 6

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

Apply the patch in a node view context.

@todo Reduce code duplication.

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

File

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

Code

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