You are here

function patchinfo_system_info_alter in PatchInfo 7

Same name and namespace in other branches
  1. 8.2 patchinfo.module \patchinfo_system_info_alter()
  2. 8 patchinfo.module \patchinfo_system_info_alter()

Implements hook_system_info_alter().

File

./patchinfo.module, line 11
Patch Info primary module file.

Code

function patchinfo_system_info_alter(&$info, $file, $type) {

  // Get patch information from .info files and save it to the database.
  if (array(
    $type,
    array(
      'module',
      'theme',
    ),
  )) {
    _patchinfo_clear_db($file->name);
    if (isset($info['patch']) && is_array($info['patch']) && count($info['patch']) > 0) {
      _patchinfo_process_module($file->name, $info['patch']);
    }
  }
}