You are here

function patch_manager_revert_action in Patch manager 6

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

Patch revert action.

@todo Reduce code duplication with above function.

1 string reference to 'patch_manager_revert_action'
patch_manager_views_default_views in ./patch_manager.views_default.inc
Implementation of hook_views_default_views().

File

./patch_manager.module, line 399
patch_manager.module 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);
  }
}