YAY FOR PHP GLOBAL HANDLING (and thanks Rob)
authorAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 7 Mar 2007 18:06:14 +0000 (18:06 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 7 Mar 2007 18:06:14 +0000 (18:06 +0000)
includes/User.php

index 3b8caf0..b42f126 100644 (file)
@@ -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__ );