You are here

function photobox_requirements in PhotoboxPhotobox 7

Implements hook_requirements().

File

./photobox.install, line 27
Install, update and uninstall functions for the Photobox module.

Code

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

  // Ensure translations don't break at install time
  $t = get_t();
  if ($phase == 'runtime') {
    if ($photobox_version = _photobox_library_version()) {
      $requirements['photobox'] = array(
        'title' => $t('Photobox library'),
        'value' => $photobox_version,
        'severity' => REQUIREMENT_OK,
      );
    }
    else {
      $requirements['photobox'] = array(
        'title' => $t('Photobox library'),
        'value' => $t('Photobox library is missing'),
        'severity' => REQUIREMENT_ERROR,
      );
    }
  }
  return $requirements;
}