You are here

function ajax_comments_requirements in AJAX Comments 6

Implementation of hook_requirements().

File

./ajax_comments.module, line 24
Implements AJAX handling for Drupal comment forms.

Code

function ajax_comments_requirements($phase) {
  if ($phase == 'runtime') {
    if (!module_exists('comment_bonus_api')) {
      $requirements['comment_bonus_api']['title'] = t('Required module is not found');
      $requirements['comment_bonus_api']['value'] = t('<a href="http://drupal.org/project/comment_bonus_api">Comments bonus API</a> is required to run AJAX Comments module. Please, download and install it (don\'t forget to flush Drupal\'s cache after it).');
      $requirements['comment_bonus_api']['severity'] = REQUIREMENT_ERROR;
      $requirements['comment_bonus_api']['reason'] = UPDATE_UNKNOWN;
      drupal_set_message($requirements['comment_bonus_api']['value'], 'error');
    }
    return $requirements;
  }
}