| 1 |
<?php |
<?php |
| 2 |
/* $Id: recaptcha_mailhide.module,v 1.1.2.7.2.2 2009/07/28 15:39:20 robloach Exp $ */ |
/* $Id: recaptcha_mailhide.module,v 1.1.2.7.2.3 2009/08/10 17:50:02 robloach Exp $ */ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 43 |
return recaptcha_mailhide_filter_tips($delta, $format); |
return recaptcha_mailhide_filter_tips($delta, $format); |
| 44 |
|
|
| 45 |
case 'settings': |
case 'settings': |
| 46 |
recaptcha_load_library(); |
_recaptcha_mailhide_load_library(); |
| 47 |
$form['filter_recaptcha'] = array('#type' => 'fieldset', '#title' => t('reCAPTCHA Mailhide Keys'), '#collapsible' => TRUE, '#collapsed' => FALSE); |
$form['filter_recaptcha'] = array('#type' => 'fieldset', '#title' => t('reCAPTCHA Mailhide Keys'), '#collapsible' => TRUE, '#collapsed' => FALSE); |
| 48 |
$form['filter_recaptcha']['recaptcha_mailhide_public_key'] = array( |
$form['filter_recaptcha']['recaptcha_mailhide_public_key'] = array( |
| 49 |
'#type' => 'textfield', |
'#type' => 'textfield', |
| 63 |
break; |
break; |
| 64 |
|
|
| 65 |
case 'process': |
case 'process': |
|
require_once('recaptcha.inc'); |
|
| 66 |
global $_recaptcha_mailhide_public_key, $_recaptcha_mailhide_private_key, $_recaptcha_mailhide_nokey_warn; |
global $_recaptcha_mailhide_public_key, $_recaptcha_mailhide_private_key, $_recaptcha_mailhide_nokey_warn; |
| 67 |
_recaptcha_mailhide_load_library(); |
_recaptcha_mailhide_load_library(); |
| 68 |
$_recaptcha_mailhide_public_key = variable_get('recaptcha_mailhide_public_key', ''); |
$_recaptcha_mailhide_public_key = variable_get('recaptcha_mailhide_public_key', ''); |
| 112 |
* Load the recaptcha library. |
* Load the recaptcha library. |
| 113 |
*/ |
*/ |
| 114 |
function _recaptcha_mailhide_load_library() { |
function _recaptcha_mailhide_load_library() { |
| 115 |
module_load_include('inc', 'recaptcha'); |
module_load_include('php', 'recaptcha', 'recaptcha/recapthcalib'); |
|
if (@!include_once(drupal_get_path('module', 'recaptcha') . '/recaptcha/recaptchalib.php')) { |
|
|
_recaptcha_library_not_found(); |
|
|
} |
|
| 116 |
} |
} |