You are here

function badbehavior_requirements in Bad Behavior 6

Same name and namespace in other branches
  1. 6.2 badbehavior.install \badbehavior_requirements()
  2. 7.2 badbehavior.install \badbehavior_requirements()

Implements hook_requirements().

File

./badbehavior.install, line 70
Install, update and uninstall functions for the badbehavior module.

Code

function badbehavior_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {
    if (badbehavior_load_includes()) {
      $requirements['badbehavior'] = array(
        'value' => BB2_VERSION,
        'severity' => REQUIREMENT_OK,
      );
    }
    else {
      $requirements['badbehavior'] = array(
        'value' => t('Missing BadBehavior library'),
        'severity' => REQUIREMENT_ERROR,
        'description' => t('Required Bad Behavior files are not found. Please consult badbehavior/README.txt for details.'),
      );
    }
    $requirements['badbehavior']['title'] = t('Bad Behavior');
  }
  return $requirements;
}