(bug 13918), make CAPTCHA less obtrusive. Added a new global $wgCaptchaBadLoginAttemp...
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 2 Jul 2008 15:00:30 +0000 (15:00 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 2 Jul 2008 15:00:30 +0000 (15:00 +0000)
ConfirmEdit.php
ConfirmEdit_body.php

index 2f7173e992d1e0e5b35f2d0554f970819275e7d6..828570355fb8893d0abe01c80909be247822f7cb 100644 (file)
@@ -149,6 +149,14 @@ $wgCaptchaBadLoginExpiration = 5 * 60;
 global $ceAllowConfirmedEmail;
 $ceAllowConfirmedEmail = false;
 
 global $ceAllowConfirmedEmail;
 $ceAllowConfirmedEmail = false;
 
+/** 
+ * Number of bad login attempts allowed before triggering the captcha.
+ * 
+ * Default is 0.
+ */
+global $wgCaptchaBadLoginAttempts;
+$wgCaptchaBadLoginAttempts = 0;
+
 /**
  * Regex to whitelist URLs to known-good sites...
  * For instance:
 /**
  * Regex to whitelist URLs to known-good sites...
  * For instance:
index bdebfec6c67320a97b216d1bfaf664ce82d012d0..31635dac4323d4c7d2006320abb74bec78b5655f 100644 (file)
@@ -204,8 +204,8 @@ class SimpleCaptcha {
         * @access private
         */
        function isBadLoginTriggered() {
         * @access private
         */
        function isBadLoginTriggered() {
-               global $wgMemc;
-               return intval( $wgMemc->get( $this->badLoginKey() ) ) > 0;
+               global $wgMemc, $wgCaptchaBadLoginAttempts;
+               return intval( $wgMemc->get( $this->badLoginKey() ) ) > $wgCaptchaBadLoginAttempts;
        }
        
        /**
        }
        
        /**