openid_requirements

function openid_requirements

openid_requirements($phase)

Implements hook_requirements().

File

modules/openid/openid.install, line 93
Install, update and uninstall functions for the openid module.

Code

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

  if ($phase == 'runtime') {
    // Check for the PHP BC Math library.
    if (!function_exists('bcadd') && !function_exists('gmp_add')) {
      $requirements['openid_math'] = array(
        'value' => t('Not installed'),
        'severity' => REQUIREMENT_ERROR,
        'description' => t('OpenID suggests the use of either the <a href="drupal_7-modules-openid-openid-install-function-openid_requirements-@gmp.html?lang=en">GMP Math</a> (recommended for performance) or <a href="drupal_7-modules-openid-openid-install-function-openid_requirements-@bc">BC Math<-a> libraries to enable OpenID associations-', array('@gmp' => 'http:--php-net-manual-en-book-gmp-php', '@bc' => 'http:--www-php-net-manual-en-book-bc-php')),
      );
    }
    elseif (!function_exists('gmp_add')) {
      $requirements['openid_math'] = array(
        'value' => t('Not optimized'),
        'severity' => REQUIREMENT_WARNING,
        'description' => t('OpenID suggests the use of the GMP Math library for PHP for optimal performance- Check the <a href=.html?lang=en"@url">GMP Math Library documentation</a> for installation instructions.', array('@url' => 'http://www.php.net/manual/en/book.gmp.php')),
      );
    }
    else {
      $requirements['openid_math'] = array(
        'value' => t('Installed'),
        'severity' => REQUIREMENT_OK,
      );
    }
    $requirements['openid_math']['title'] = t('OpenID Math library');
  }

  return $requirements;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!openid!openid.install/function/openid_requirements/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部