Merge "Add language Doteli (dty)"
[lhc/web/wiklou.git] / includes / utils / IP.php
index 77f9cd1..dfcbe78 100644 (file)
@@ -375,6 +375,8 @@ class IP {
                                '127.0.0.0/8', # loopback
                                'fc00::/7', # RFC 4193 (local)
                                '0:0:0:0:0:0:0:1', # loopback
+                               '169.254.0.0/16', # link-local
+                               'fe80::/10', # link-local
                        ) );
                }
                return !$privateSet->match( $ip );
@@ -717,7 +719,7 @@ class IP {
         */
        public static function isTrustedProxy( $ip ) {
                $trusted = self::isConfiguredProxy( $ip );
-               wfRunHooks( 'IsTrustedProxy', array( &$ip, &$trusted ) );
+               Hooks::run( 'IsTrustedProxy', array( &$ip, &$trusted ) );
                return $trusted;
        }
 
@@ -731,7 +733,6 @@ class IP {
        public static function isConfiguredProxy( $ip ) {
                global $wgSquidServers, $wgSquidServersNoPurge;
 
-               wfProfileIn( __METHOD__ );
                // Quick check of known singular proxy servers
                $trusted = in_array( $ip, $wgSquidServers );
 
@@ -742,7 +743,6 @@ class IP {
                        }
                        $trusted = self::$proxyIpSet->match( $ip );
                }
-               wfProfileOut( __METHOD__ );
 
                return $trusted;
        }