r104871 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104870‎ | r104871 | r104872 >
Date:16:42, 1 December 2011
Author:mah
Status:resolved (Comments)
Tags:
Comment:
w/s fixups before real changes.
Modified paths:
  • /trunk/extensions/ConfirmEdit/ReCaptcha.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmEdit/ReCaptcha.php
@@ -55,8 +55,8 @@
5656
5757 if ($wgReCaptchaPublicKey == '' || $wgReCaptchaPrivateKey == '') {
5858 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>.");
6161 }
6262 }
6363
@@ -68,9 +68,9 @@
6969
7070 /**
7171 * 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.
7373 *
74 - */
 74+ */
7575 function getForm() {
7676 global $wgReCaptchaPublicKey, $wgReCaptchaTheme;
7777 $useHttps = ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' );
@@ -82,21 +82,21 @@
8383 /**
8484 * Calls the library function recaptcha_check_answer to verify the users input.
8585 * Sets $this->recaptcha_error if the user is incorrect.
86 - * @return boolean
87 - *
88 - */
 86+ * @return boolean
 87+ *
 88+ */
8989 function passCaptcha() {
9090 global $wgReCaptchaPrivateKey;
9191 $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) {
9696 $this->recaptcha_error = $recaptcha_response->error;
9797 return false;
98 - }
 98+ }
9999 $recaptcha_error = null;
100 - return true;
 100+ return true;
101101
102102 }
103103

Follow-up revisions

RevisionCommit summaryAuthorDate
r104873moar w/s fixupsmah16:51, 1 December 2011

Comments

#Comment by Nikerabbit (talk | contribs)   09:19, 2 December 2011

Little too much tabs at places.

#Comment by Nikerabbit (talk | contribs)   09:20, 2 December 2011

Which you fixed in an unmentioned followup.

#Comment by MarkAHershberger (talk | contribs)   20:27, 3 December 2011

r104873 maybe?

Status & tagging log