X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FGlobalFunctions.php;h=b6a1470ee9bc389674c8e791d39d05bdd93e75a8;hb=19fe64a134233613126cdbd8e4db7f24b693116d;hp=319bf6397ee87a9f39e36be0d738706947e8180c;hpb=c1c3302286deb92f3eb81a39b5ee61f8c413f5ad;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 319bf6397e..b6a1470ee9 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; } } } @@ -2051,7 +2050,7 @@ function wfMkdirParents( $dir, $mode = null, $caller = null ) { */ function wfRecursiveRemoveDir( $dir ) { wfDebug( __FUNCTION__ . "( $dir )\n" ); - // taken from https://secure.php.net/manual/en/function.rmdir.php#98622 + // taken from https://www.php.net/manual/en/function.rmdir.php#98622 if ( is_dir( $dir ) ) { $objects = scandir( $dir ); foreach ( $objects as $object ) { @@ -2137,7 +2136,7 @@ function wfStringToBool( $val ) { * @param string|string[] ...$args strings to escape and glue together, * or a single array of strings parameter * @return string - * @deprecated since 1.30 use MediaWiki\Shell::escape() + * @deprecated since 1.30 use MediaWiki\Shell\Shell::escape() */ function wfEscapeShellArg( ...$args ) { return Shell::escape( ...$args ); @@ -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. *