summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-08-29 21:07:43 +0000
committerDries Buytaert <dries@buytaert.net>2009-08-29 21:07:43 +0000
commite1d3687b23efd8087a441e3a63171fe7c1a7bea6 (patch)
tree909321bdaf9c8b0fd810710425d162ce3910b403
parent44063e1cf19ad80f1a7e72b2c7e70a305297043b (diff)
downloadbrdo-e1d3687b23efd8087a441e3a63171fe7c1a7bea6.tar.gz
brdo-e1d3687b23efd8087a441e3a63171fe7c1a7bea6.tar.bz2
- Patch #504630 by Dave Van Den Bremt: aded requirements check.
-rw-r--r--modules/openid/openid.install27
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/openid/openid.install b/modules/openid/openid.install
index 054b3b017..6dd056bcd 100644
--- a/modules/openid/openid.install
+++ b/modules/openid/openid.install
@@ -73,3 +73,30 @@ function openid_schema() {
return $schema;
}
+
+/**
+ * Implement hook_requirements().
+ */
+function openid_requirements($phase) {
+ $requirements = array();
+
+ if ($phase == 'runtime') {
+ // Check for the PHP BC Math library.
+ if (!function_exists('bcadd')) {
+ $requirements['bcmath'] = array(
+ 'value' => t('Not installed'),
+ 'severity' => REQUIREMENT_ERROR,
+ 'description' => t('OpenID requires the BC Math library for PHP which is missing or outdated. Please check the <a href="@url">PHP BC Math Library documentation</a> for information on how to correct this.', array('@url' => 'http://www.php.net/manual/en/book.bc.php')),
+ );
+ }
+ else {
+ $requirements['bcmath'] = array(
+ 'value' => t('Installed'),
+ 'severity' => REQUIREMENT_OK,
+ );
+ }
+ $requirements['bcmath']['title'] = t('BC Match library');
+ }
+
+ return $requirements;
+}