You are here

function lingotek_requirements in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lingotek.install \lingotek_requirements()
  2. 7.2 lingotek.install \lingotek_requirements()
  3. 7.3 lingotek.install \lingotek_requirements()
  4. 7.4 lingotek.install \lingotek_requirements()
  5. 7.5 lingotek.install \lingotek_requirements()

File

./lingotek.install, line 14

Code

function lingotek_requirements($phase) {
  $requirements = array();
  $t = get_t();
  $test = FALSE;

  // test requirement message appearance
  // Ensure that the PHP Zip library is loaded
  if ($test || !extension_loaded('zip')) {
    $requirements['zip'] = array(
      'title' => $t('Lingotek'),
      'value' => $t('PHP Zip support required.'),
      'description' => $t('The Lingotek Translation module requires the PHP module \'Zip\', but it is missing or not enabled on your server. This module allows PHP to work with ZIP compressed archives.  <br>For more information visit: <a href="http://php.net/manual/en/book.zip.php">http://php.net/manual/en/book.zip.php</a>'),
      'severity' => REQUIREMENT_ERROR,
    );
  }

  // Ensure that the PHP cURL support is enabled
  if ($test || !function_exists('curl_version')) {
    $requirements['curl'] = array(
      'title' => $t('Lingotek'),
      'value' => $t('PHP cURL support required'),
      'description' => $t('Lingotek requires the that PHP CURL be enabled on your server.  <br>For more information visit: <a href="http://www.php.net/manual/en/curl.installation.php">http://www.php.net/manual/en/curl.installation.php</a>'),
      'severity' => REQUIREMENT_ERROR,
    );
  }
  return $requirements;
}