X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2FRecaptcha%2FRecaptchaPlugin.php;h=3665214f85710c603f811763c78e08a7e7afe5e1;hb=a116cde1a401b1959515b8e6b512c41603387031;hp=1a51b16beb7b5113d801ff5f6d2d74cffb69d6c9;hpb=6a1afda259c5223449f679a64f932e36df5ebe39;p=quix0rs-gnu-social.git
diff --git a/plugins/Recaptcha/RecaptchaPlugin.php b/plugins/Recaptcha/RecaptchaPlugin.php
index 1a51b16beb..3665214f85 100644
--- a/plugins/Recaptcha/RecaptchaPlugin.php
+++ b/plugins/Recaptcha/RecaptchaPlugin.php
@@ -44,11 +44,11 @@ class RecaptchaPlugin extends Plugin
var $ssl;
function onInitializePlugin(){
- if(!isset($this->private_key)){
- common_log(LOG_ERR, "Recaptcha: Must specify private_key in config.php");
+ if(!isset($this->private_key)) {
+ common_log(LOG_ERR, 'Recaptcha: Must specify private_key in config.php');
}
- if(!isset($this->public_key)){
- common_log(LOG_ERR, "Recaptcha: Must specify public_key in config.php");
+ if(!isset($this->public_key)) {
+ common_log(LOG_ERR, 'Recaptcha: Must specify public_key in config.php');
}
}
@@ -59,25 +59,12 @@ class RecaptchaPlugin extends Plugin
return false;
}
- function onStartShowHTML($action)
- {
- //XXX: Horrible hack to make Safari, FF2, and Chrome work with
- //reChapcha. reChapcha beaks xhtml strict
- header('Content-Type: text/html');
-
- $action->extraHeaders();
-
- $action->startXML('html');
-
- $action->raw('');
- return false;
- }
function onEndRegistrationFormData($action)
{
$action->elementStart('li');
- $action->raw('');
- if($this->checkssl() === true){
+ $action->raw('');
+ if($this->checkssl() === true) {
$action->raw(recaptcha_get_html($this->public_key), null, true);
} else {
$action->raw(recaptcha_get_html($this->public_key));
@@ -93,11 +80,9 @@ class RecaptchaPlugin extends Plugin
$action->trimmed('recaptcha_challenge_field'),
$action->trimmed('recaptcha_response_field'));
- if (!$resp->is_valid)
- {
- if($this->display_errors)
- {
- $action->showForm ("(reCAPTCHA said: " . $resp->error . ")");
+ if (!$resp->is_valid) {
+ if($this->display_errors) {
+ $action->showForm ("(reCAPTCHA error: " . $resp->error . ")");
}
$action->showForm("Captcha does not match!");
return false;