function accessibility_requirements

cis7 accessibility.install accessibility_requirements($phase)
cle7 accessibility.install accessibility_requirements($phase)
elmsmedia7 accessibility.install accessibility_requirements($phase)
icor7 accessibility.install accessibility_requirements($phase)
meedjum_blog7 accessibility.install accessibility_requirements($phase)
mooc7 accessibility.install accessibility_requirements($phase)

Implements hook_requirements().

File

sites/all/modules/ulmus/accessibility/accessibility.install, line 94

Code

function accessibility_requirements($phase) {
  if (!module_exists('libraries')) {
    return array();
  }
  $requirements = array('quail_installed' => array('title' => t('QUAIL library installed')));
  $library_path = libraries_get_path('quail');
  if ($library_path && file_exists($library_path . '/quail.json')) {
    $version = json_decode(file_get_contents($library_path . '/quail.json'));
    if (version_compare(ACCESSIBILITY_QUAIL_VERSION, $version->version) < 1) {
      $requirements['quail_installed']['value'] = t('QUAIL version @version installed', array('@version' => $version->version));
      $requirements['quail_installed']['severity'] = REQUIREMENT_OK;
    }
    else {
      $requirements['quail_installed']['value'] = t('QUAIL should be at least version 2.0.3, installed version is @version', array('@version' => $version->version));
      $requirements['quail_installed']['severity'] = REQUIREMENT_ERROR;
      $requirements['quail_installed']['description'] = t('You must download the !link and install it in your libraries folder, and make sure the folder is re-named to "quail" without a version number.', array(
        '!link' => l('QUAIL jQuery library', 'https://github.com/kevee/quail/releases'),
      ));
    }
  }
  else {
    $requirements['quail_installed']['value'] = t('QUAIL not installed');
    $requirements['quail_installed']['severity'] = REQUIREMENT_ERROR;
    $requirements['quail_installed']['description'] = t('You must download the !link version @version and install it in your libraries folder, and make sure the folder is re-named to "quail" without a version number.', array(
      '@version' => ACCESSIBILITY_QUAIL_VERSION,
      '!link' => l('QUAIL jQuery library', 'https://github.com/kevee/quail/releases'),
    ));
  }
  return $requirements;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.