r70027 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70026‎ | r70027 | r70028 >
Date:18:52, 27 July 2010
Author:platonides
Status:ok
Tags:
Comment:
$wgMemc at line 563 was only the global if $wgPasswordAttemptThrottle was an array
Aren't globals funny?
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -429,7 +429,8 @@
430430 * creation.
431431 */
432432 public function authenticateUserData() {
433 - global $wgUser, $wgAuth;
 433+ global $wgUser, $wgAuth, $wgMemc;
 434+
434435 if ( $this->mName == '' ) {
435436 return self::NO_NAME;
436437 }
@@ -457,7 +458,6 @@
458459 $count = $wgPasswordAttemptThrottle['count'];
459460 $period = $wgPasswordAttemptThrottle['seconds'];
460461
461 - global $wgMemc;
462462 $throttleCount = $wgMemc->get( $throttleKey );
463463 if ( !$throttleCount ) {
464464 $wgMemc->add( $throttleKey, 1, $period ); // start counter

Status & tagging log