Fix for Bug 63980 - Comparison of limits in pingLimiter is incorrect
authorRohan <rohan1395@yahoo.com>
Tue, 10 Jun 2014 14:50:21 +0000 (20:20 +0530)
committerRohan <rohan1395@yahoo.com>
Tue, 10 Jun 2014 14:51:41 +0000 (20:21 +0530)
Change-Id: Ie9da2c5af82d60e974bd258554b9438c1667630a

includes/User.php

index f2d3d9b..526653b 100644 (file)
@@ -1719,7 +1719,9 @@ class User {
                // If more than one group applies, use the group with the highest limit
                foreach ( $this->getGroups() as $group ) {
                        if ( isset( $limits[$group] ) ) {
-                               if ( $userLimit === false || $limits[$group] > $userLimit ) {
+                               if ( $userLimit === false
+                                       || $limits[$group][0] / $limits[$group][1] > $userLimit[0] / $userLimit[1]
+                               ) {
                                        $userLimit = $limits[$group];
                                }
                        }