X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FGlobalFunctions.php;h=b0a79e8d5c967f89773b1207303a9272d9366758;hp=51fe1671d41ed5aed0097b17b8a1beee6652d61c;hb=a38af7ba26579bb3004f673e44d39710887763aa;hpb=8445510fbe64c5125ce85e544855b29a576b0282 diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 51fe1671d4..b0a79e8d5c 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -334,6 +334,7 @@ function wfUrlencode( $s ) { static $needle; if ( is_null( $s ) ) { + // Reset $needle for testing. $needle = null; return ''; } @@ -1749,13 +1750,11 @@ function wfResetOutputBuffers( $resetGzipEncoding = true ) { // to avoid getting in some kind of infinite loop. break; } - if ( $resetGzipEncoding ) { - if ( $status['name'] == 'ob_gzhandler' ) { - // Reset the 'Content-Encoding' field set by this handler - // so we can start fresh. - header_remove( 'Content-Encoding' ); - break; - } + if ( $resetGzipEncoding && $status['name'] == 'ob_gzhandler' ) { + // Reset the 'Content-Encoding' field set by this handler + // so we can start fresh. + header_remove( 'Content-Encoding' ); + break; } } } @@ -2609,22 +2608,6 @@ function wfWikiID() { } } -/** - * Split a wiki ID into DB name and table prefix - * - * @param string $wiki - * - * @return array - * @deprecated 1.32 - */ -function wfSplitWikiID( $wiki ) { - $bits = explode( '-', $wiki, 2 ); - if ( count( $bits ) < 2 ) { - $bits[] = ''; - } - return $bits; -} - /** * Get a Database object. * @@ -2657,8 +2640,8 @@ function wfGetDB( $db, $groups = [], $wiki = false ) { /** * Get a load balancer object. * - * @deprecated since 1.27, use MediaWikiServices::getDBLoadBalancer() - * or MediaWikiServices::getDBLoadBalancerFactory() instead. + * @deprecated since 1.27, use MediaWikiServices::getInstance()->getDBLoadBalancer() + * or MediaWikiServices::getInstance()->getDBLoadBalancerFactory() instead. * * @param string|bool $wiki Wiki ID, or false for the current wiki * @return \Wikimedia\Rdbms\LoadBalancer @@ -2675,7 +2658,7 @@ function wfGetLB( $wiki = false ) { /** * Get the load balancer factory object * - * @deprecated since 1.27, use MediaWikiServices::getDBLoadBalancerFactory() instead. + * @deprecated since 1.27, use MediaWikiServices::getInstance()->getDBLoadBalancerFactory() instead. * * @return \Wikimedia\Rdbms\LBFactory */