Mercurial > hg > rr-repo
diff sites/all/modules/recaptcha/recaptcha.admin.inc @ 3:b28be78d8160
alpha1.0 version
author | danieleb <danielebarchiesi@me.com> |
---|---|
date | Thu, 19 Sep 2013 10:33:07 +0100 |
parents | b74b41bb73f0 |
children |
line wrap: on
line diff
--- a/sites/all/modules/recaptcha/recaptcha.admin.inc Thu Aug 22 17:22:54 2013 +0100 +++ b/sites/all/modules/recaptcha/recaptcha.admin.inc Thu Sep 19 10:33:07 2013 +0100 @@ -9,8 +9,11 @@ * Form callback; administrative settings for reCaptcha. */ function recaptcha_admin_settings() { - // Load the recaptcha library. - _recaptcha_load_library(); + // Load the recaptcha library. Error if library does not load. + if (!_recaptcha_load_library()) { + drupal_set_message(t('Error loading recaptchalib.'), 'error'); + return FALSE; + } $form = array(); $form['recaptcha_public_key'] = array( @@ -18,7 +21,7 @@ '#title' => t('Public Key'), '#default_value' => variable_get('recaptcha_public_key', ''), '#maxlength' => 40, - '#description' => t('The public key given to you when you <a href="@url" target="_blank">registered at reCAPTCHA.net</a>.', array('@url' => url(recaptcha_get_signup_url($_SERVER['SERVER_NAME'], variable_get('site_name', ''))))), + '#description' => t('The public key given to you when you <a href="@url" target="_blank">register for reCAPTCHA</a>.', array('@url' => url(recaptcha_get_signup_url($_SERVER['SERVER_NAME'], variable_get('site_name', ''))))), '#required' => TRUE, ); $form['recaptcha_private_key'] = array( @@ -26,7 +29,7 @@ '#title' => t('Private Key'), '#default_value' => variable_get('recaptcha_private_key', ''), '#maxlength' => 40, - '#description' => t('The private key given to you when you <a href="@url" target="_blank">registered at reCAPTCHA.net</a>.', array('@url' => url(recaptcha_get_signup_url($_SERVER['SERVER_NAME'], variable_get('site_name', ''))))), + '#description' => t('The private key given to you when you <a href="@url" target="_blank">register for reCAPTCHA</a>.', array('@url' => url(recaptcha_get_signup_url($_SERVER['SERVER_NAME'], variable_get('site_name', ''))))), '#required' => TRUE, ); $form['recaptcha_ajax_api'] = array(