You are here

function patch_manager_revert_action in Patch manager 7

Same name and namespace in other branches
  1. 6 patch_manager.module \patch_manager_revert_action()

Patch revert action

@todo Reduce code duplication with above function

File

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

Code

function patch_manager_revert_action(&$object, $context = array()) {
  $result = patch_manager_runpatch($object, '-R');
  if ($result->status === PATCH_MANAGER_SUCCESS) {
    drupal_set_message(t('Patch (@title) was reversed successfully', array(
      '@title' => $object->title,
    )));
  }
  else {
    _patch_manager_display_errors($result);
  }
}