You are here

function filefield_requirements in FileField 5.2

Same name and namespace in other branches
  1. 6.3 filefield.install \filefield_requirements()

Implementation of hook_requirements().

File

./filefield.module, line 48
Defines a file field type.

Code

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

  // Ensure translations don't break at install time
  $t = get_t();
  if ($phase == 'runtime' && version_compare(phpversion(), FILEFIELD_MINIMUM_PHP) < 0) {
    $requirements['filefield_php'] = array(
      'title' => $t('FileField PHP'),
      'description' => $t('FileField recommends at least PHP %version. Older versions of PHP are not supported but may function.', array(
        '%version' => FILEFIELD_MINIMUM_PHP,
      )),
      'severity' => REQUIREMENT_WARNING,
    );
  }
  return $requirements;
}