Index: trunk/extensions/ConfirmEdit/ReCaptcha.php |
— | — | @@ -55,8 +55,8 @@ |
56 | 56 | |
57 | 57 | if ($wgReCaptchaPublicKey == '' || $wgReCaptchaPrivateKey == '') { |
58 | 58 | die ('You need to set $wgReCaptchaPrivateKey and $wgReCaptchaPublicKey in LocalSettings.php to ' . |
59 | | - "use the reCAPTCHA plugin. You can sign up for a key <a href='" . |
60 | | - htmlentities(recaptcha_get_signup_url ($wgServerName, "mediawiki")) . "'>here</a>."); |
| 59 | + "use the reCAPTCHA plugin. You can sign up for a key <a href='" . |
| 60 | + htmlentities(recaptcha_get_signup_url ($wgServerName, "mediawiki")) . "'>here</a>."); |
61 | 61 | } |
62 | 62 | } |
63 | 63 | |
— | — | @@ -68,9 +68,9 @@ |
69 | 69 | |
70 | 70 | /** |
71 | 71 | * Displays the reCAPTCHA widget. |
72 | | - * If $this->recaptcha_error is set, it will display an error in the widget. |
| 72 | + * If $this->recaptcha_error is set, it will display an error in the widget. |
73 | 73 | * |
74 | | - */ |
| 74 | + */ |
75 | 75 | function getForm() { |
76 | 76 | global $wgReCaptchaPublicKey, $wgReCaptchaTheme; |
77 | 77 | $useHttps = ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ); |
— | — | @@ -82,21 +82,21 @@ |
83 | 83 | /** |
84 | 84 | * Calls the library function recaptcha_check_answer to verify the users input. |
85 | 85 | * Sets $this->recaptcha_error if the user is incorrect. |
86 | | - * @return boolean |
87 | | - * |
88 | | - */ |
| 86 | + * @return boolean |
| 87 | + * |
| 88 | + */ |
89 | 89 | function passCaptcha() { |
90 | 90 | global $wgReCaptchaPrivateKey; |
91 | 91 | $recaptcha_response = recaptcha_check_answer ($wgReCaptchaPrivateKey, |
92 | | - wfGetIP (), |
93 | | - $_POST['recaptcha_challenge_field'], |
94 | | - $_POST['recaptcha_response_field']); |
95 | | - if (!$recaptcha_response->is_valid) { |
| 92 | + wfGetIP (), |
| 93 | + $_POST['recaptcha_challenge_field'], |
| 94 | + $_POST['recaptcha_response_field']); |
| 95 | + if (!$recaptcha_response->is_valid) { |
96 | 96 | $this->recaptcha_error = $recaptcha_response->error; |
97 | 97 | return false; |
98 | | - } |
| 98 | + } |
99 | 99 | $recaptcha_error = null; |
100 | | - return true; |
| 100 | + return true; |
101 | 101 | |
102 | 102 | } |
103 | 103 | |