From: Aryeh Gregor Date: Wed, 7 Mar 2007 18:06:14 +0000 (+0000) Subject: YAY FOR PHP GLOBAL HANDLING (and thanks Rob) X-Git-Tag: 1.31.0-rc.0~53872 X-Git-Url: http://git.cyclocoop.org/clavettes/images/siteon3.jpg?a=commitdiff_plain;h=c254da50e77796db9f5cefb756d9e4de0477d3f3;p=lhc%2Fweb%2Fwiklou.git YAY FOR PHP GLOBAL HANDLING (and thanks Rob) --- diff --git a/includes/User.php b/includes/User.php index 3b8caf0264..b42f1262dd 100644 --- a/includes/User.php +++ b/includes/User.php @@ -949,6 +949,7 @@ class User { * @return bool */ public function isPingLimitable() { + global $wgRateLimitsExcludedGroups; return array_intersect($this->getEffectiveGroups(), $wgRateLimitsExcludedGroups) != array(); } @@ -963,22 +964,22 @@ class User { * @public */ function pingLimiter( $action='edit' ) { - + # Call the 'PingLimiter' hook $result = false; if( !wfRunHooks( 'PingLimiter', array( &$this, $action, $result ) ) ) { return $result; } - + global $wgRateLimits, $wgRateLimitsExcludedGroups; if( !isset( $wgRateLimits[$action] ) ) { return false; } - + # Some groups shouldn't trigger the ping limiter, ever if( !$this->isPingLimitable() ) return false; - + global $wgMemc, $wgRateLimitLog; wfProfileIn( __METHOD__ );