r97989 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97988‎ | r97989 | r97990 >
Date:07:45, 24 September 2011
Author:aaron
Status:deferred (Comments)
Tags:
Comment:
Don't bother showing captcha on request account form if user has the 'skipcaptcha' right
Modified paths:
  • /trunk/extensions/ConfirmAccount/presentation/specialpages/actions/RequestAccount_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmAccount/presentation/specialpages/actions/RequestAccount_body.php
@@ -198,9 +198,9 @@
199199 }
200200 # FIXME: do this better...
201201 global $wgConfirmAccountCaptchas, $wgCaptchaClass, $wgCaptchaTriggers;
202 - if ( $wgConfirmAccountCaptchas && isset( $wgCaptchaClass ) && $wgCaptchaTriggers['createaccount'] ) {
203 - global $wgExtensionMessagesFiles;
204 -
 202+ if ( $wgConfirmAccountCaptchas && isset( $wgCaptchaClass )
 203+ && $wgCaptchaTriggers['createaccount'] && !$wgUser->isAllowed( 'skipcaptcha' ) )
 204+ {
205205 $captcha = new $wgCaptchaClass;
206206 # Hook point to add captchas
207207 $form .= '<fieldset>';
@@ -229,7 +229,7 @@
230230 $this->showForm( wfMsgHtml( 'noname' ) );
231231 return;
232232 }
233 - # FIXME: Hack! If we don't want them for requests, temporarily turn it off!
 233+ # FIXME: Hack! If we don't want captchas for requests, temporarily turn it off!
234234 global $wgConfirmAccountCaptchas, $wgCaptchaTriggers;
235235 if ( !$wgConfirmAccountCaptchas && isset( $wgCaptchaTriggers ) ) {
236236 $old = $wgCaptchaTriggers['createaccount'];

Comments

#Comment by Aaron Schulz (talk | contribs)   07:47, 24 September 2011

Also removed unused $wgExtensionMessagesFiles global.

Status & tagging log