From: Rohan Date: Tue, 10 Jun 2014 14:50:21 +0000 (+0530) Subject: Fix for Bug 63980 - Comparison of limits in pingLimiter is incorrect X-Git-Tag: 1.31.0-rc.0~13687^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=5a53d94111f4461813971ac9c344a68a589befd9;p=lhc%2Fweb%2Fwiklou.git Fix for Bug 63980 - Comparison of limits in pingLimiter is incorrect Change-Id: Ie9da2c5af82d60e974bd258554b9438c1667630a --- diff --git a/includes/User.php b/includes/User.php index f2d3d9b18d..526653b95a 100644 --- a/includes/User.php +++ b/includes/User.php @@ -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]; } }