You are here

function patch_manager_apply_action in Patch manager 6

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

Patch apply action.

@todo Reduce code duplication with below function.

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

File

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

Code

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