$text = trim( $text );
- // Inline logic from deprecated wfDebugTimer()
if ( $wgDebugTimestamps ) {
$context['seconds_elapsed'] = sprintf(
'%6.4f',
return $cache;
}
-/**
- * Get microsecond timestamps for debug logs
- *
- * @deprecated since 1.25
- * @return string
- */
-function wfDebugTimer() {
- global $wgDebugTimestamps, $wgRequestTime;
-
- wfDeprecated( __METHOD__, '1.25' );
-
- if ( !$wgDebugTimestamps ) {
- return '';
- }
-
- $prefix = sprintf( "%6.4f", microtime( true ) - $wgRequestTime );
- $mem = sprintf( "%5.1fM", ( memory_get_usage( true ) / ( 1024 * 1024 ) ) );
- return "$prefix $mem ";
-}
-
/**
* Send a line giving PHP memory usage.
*
return in_array( $str, $infinityValues );
}
-/**
- * Work out the IP address based on various globals
- * For trusted proxies, use the XFF client IP (first of the chain)
- *
- * @deprecated since 1.19; call $wgRequest->getIP() directly.
- * @return string
- */
-function wfGetIP() {
- wfDeprecated( __METHOD__, '1.19' );
- global $wgRequest;
- return $wgRequest->getIP();
-}
-
-/**
- * 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()
- *
- * @param string $ip
- * @return bool
- * @since 1.23 Supports CIDR ranges in $wgSquidServersNoPurge
- */
-function wfIsConfiguredProxy( $ip ) {
- wfDeprecated( __METHOD__, '1.24' );
- return IP::isConfiguredProxy( $ip );
-}
-
/**
* Returns true if these thumbnail parameters match one that MediaWiki
* requests from file description pages and/or parser output.