You are here

function flickrgallery_requirements in FlickrGallery 7.2

Same name and namespace in other branches
  1. 7.3 flickrgallery.install \flickrgallery_requirements()
  2. 7 flickrgallery.install \flickrgallery_requirements()

Implements hook_requirements().

File

./flickrgallery.install, line 35
Install and uninstall hooks Remove variables from table while uninstalling

Code

function flickrgallery_requirements($phase) {
  $requirements = array();

  // Ensure translations don't break at install time.
  $t = get_t();

  // Check if FlickAPI is available.
  if ($phase == 'runtime') {
    if (!module_exists('flickrapi')) {
      $requirements['flickrgallery'] = array(
        'title' => $t('Flick Gallery'),
        'description' => $t('You need to install the !FlickrAPI module.', array(
          '!FlickrAPI' => l($t('FlickrAPI'), 'http://drupal.org/project/flickrapi'),
        )),
        'severity' => REQUIREMENT_ERROR,
        'value' => $t('Not installed'),
      );
    }
  }
  return $requirements;
}