Merge "Remove ApiQueryBase::getDirectionDescription()"
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 4a3fceb..e30b371 100644 (file)
@@ -460,12 +460,12 @@ function wfUrlencode( $s ) {
 }
 
 /**
- * This function takes two arrays as input, and returns a CGI-style string, e.g.
+ * This function takes one or two arrays as input, and returns a CGI-style string, e.g.
  * "days=7&limit=100". Options in the first array override options in the second.
  * Options set to null or false will not be output.
  *
  * @param array $array1 ( String|Array )
- * @param array $array2 ( String|Array )
+ * @param array|null $array2 ( String|Array )
  * @param string $prefix
  * @return string
  */
@@ -1051,7 +1051,6 @@ function wfDebug( $text, $dest = 'all', array $context = array() ) {
 
        $text = trim( $text );
 
-       // Inline logic from deprecated wfDebugTimer()
        if ( $wgDebugTimestamps ) {
                $context['seconds_elapsed'] = sprintf(
                        '%6.4f',
@@ -1094,26 +1093,6 @@ function wfIsDebugRawPage() {
        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.
  *
@@ -4093,46 +4072,6 @@ function wfIsInfinity( $str ) {
        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.
- * Squid 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.