bug fixes for throttle feature
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 26 Jun 2004 04:10:48 +0000 (04:10 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 26 Jun 2004 04:10:48 +0000 (04:10 +0000)
includes/SpecialUserlogin.php

index d98f6bc..700cf6c 100644 (file)
@@ -132,10 +132,10 @@ class LoginForm {
                        $key = "$wgDBname:acctcreate:ip:$wgIP";
                        $value = $wgMemc->incr( $key );
                        if ( !$value ) {
-                               $wgMemc->set( $key, 0, 86400 );
+                               $wgMemc->set( $key, 1, 86400 );
                        }
-                       if ( $value > $wgAccountCreationThrottle ) {
-                               $this->throttleHit();
+                       if ( $value > $wgAccountCreationThrottle ) {
+                               $this->throttleHit( $wgAccountCreationThrottle );
                                return;
                        }
                }