You are here

function answers_requirements in Answers 6

Same name and namespace in other branches
  1. 6.2 answers.install \answers_requirements()
  2. 7.4 answers.install \answers_requirements()
  3. 7.3 answers.install \answers_requirements()

Implement hook_requirements().

This check is only required because I introduced a new module dependency after releasing the module. Answers now depends on NodeReference Count. Module users may update the code without noticing they should instal NodeReference Count

File

./answers.install, line 18

Code

function answers_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime' && !module_exists('nodereference_count')) {
    $t = get_t();
    $requirements['answers_nodereference_count'] = array(
      'title' => $t('Answers Module Dependencies'),
      'value' => $t('Module not found: The Answers module requires that the NodeReference Count module be installed'),
      'severity' => REQUIREMENT_ERROR,
    );
  }
  return $requirements;
}