From cd78210ee7513aa6d8111d5b52542513a91f97fe Mon Sep 17 00:00:00 2001 From: Ori Livneh Date: Sun, 13 Dec 2015 13:56:56 -0800 Subject: [PATCH] Remove wfIsTrustedProxy(), deprecated since 1.24 No usage outside of core: https://github.com/search?utf8=%E2%9C%93&q=%40wikimedia+wfIsTrustedProxy&type=Code&ref=searchresults Change-Id: I86439a772e036dcd5ebdd8b16010c7bacfd9463b --- docs/hooks.txt | 4 ++-- includes/GlobalFunctions.php | 14 -------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index fe88fa7d56..c65cdb6e03 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1686,9 +1686,9 @@ $rc: RecentChange object that triggered url generation 'IsFileCacheable': Override the result of Article::isFileCacheable() (if true) &$article: article (object) being checked -'IsTrustedProxy': Override the result of wfIsTrustedProxy() +'IsTrustedProxy': Override the result of IP::isTrustedProxy() &$ip: IP being check -&$result: Change this value to override the result of wfIsTrustedProxy() +&$result: Change this value to override the result of IP::isTrustedProxy() 'IsUploadAllowedFromUrl': Override the result of UploadFromUrl::isAllowedUrl() $url: URL used to upload from diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 3ca4984e28..e705dd6ced 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -4093,20 +4093,6 @@ function wfIsInfinity( $str ) { return in_array( $str, $infinityValues ); } -/** - * Checks if an IP is a trusted proxy provider. - * Useful to tell if X-Forwarded-For data is possibly bogus. - * CDN cache servers for the site are whitelisted. - * @deprecated Since 1.24, use IP::isTrustedProxy() - * - * @param string $ip - * @return bool - */ -function wfIsTrustedProxy( $ip ) { - wfDeprecated( __METHOD__, '1.24' ); - return IP::isTrustedProxy( $ip ); -} - /** * Checks if an IP matches a proxy we've configured. * @deprecated Since 1.24, use IP::isConfiguredProxy() -- 2.20.1