? dumb.diff Index: openid.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/openid/openid.install,v retrieving revision 1.2 diff -u -p -r1.2 openid.install --- openid.install 25 Mar 2007 06:38:00 -0000 1.2 +++ openid.install 15 May 2007 21:36:36 -0000 @@ -2,24 +2,6 @@ // $Id: openid.install,v 1.2 2007/03/25 06:38:00 walkah Exp $ /** - * OpenID module requires bcmath - */ -function openid_requirements($phase) { - if ($phase == 'runtime') { - $requirements['bcmath']['title'] = t('BCMath'); - if (function_exists('bcadd')) { - $requirements['bcmath']['severity'] = REQUIREMENT_OK; - $requirements['bcmath']['value'] = t('Enabled'); - } - else { - $requirements['bcmath']['severity'] = REQUIREMENT_ERROR; - $requirements['bcmath']['description'] = t('OpenID needs the bcmath extension for encryption.'); - } - } - return $requirements; -} - -/** * Implementation of hook_install */ function openid_install() { Index: openid.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/openid/openid.module,v retrieving revision 1.2 diff -u -p -r1.2 openid.module --- openid.module 25 Mar 2007 06:38:00 -0000 1.2 +++ openid.module 15 May 2007 21:36:36 -0000 @@ -133,10 +133,14 @@ function openid_login_form_submit($formi $idp_endpoint = $services[0]['uri']; $_SESSION['openid_idp_endpoint'] = $idp_endpoint; - $assoc_handle = openid_association($claimed_id, $idp_endpoint); - if (empty($assoc_handle)) { - drupal_set_message(t('OpenID Association failed'), 'error'); - return; + + // if we have BCMath, we should use OpenID smart mode + if (function_exists('bcadd')) { + $assoc_handle = openid_association($claimed_id, $idp_endpoint); + if (empty($assoc_handle)) { + drupal_set_message(t('OpenID Association failed'), 'error'); + return; + } } // Now that there is an association created, move on