X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FGlobalFunctions.php;h=b06c1b842c581b1884aa9e9c8e1ce7984c4c1faa;hb=9816dcbe8e47d54aeb9fbac9bb84caeab37e53c1;hp=7833a71f06ef397e70c22907f401accaeae87eea;hpb=51d13453fb645061c26a4141db1d0f3f68482ffb;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 7833a71f06..b06c1b842c 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1242,10 +1242,10 @@ function wfIncrStats( $key, $count = 1 ) { $count = intval( $count ); if( $wgStatsMethod == 'udp' ) { - global $wgUDPProfilerHost, $wgUDPProfilerPort, $wgDBname, $wgAggregateStatsID; + global $wgUDPProfilerHost, $wgUDPProfilerPort, $wgAggregateStatsID; static $socket; - $id = $wgAggregateStatsID !== false ? $wgAggregateStatsID : $wgDBname; + $id = $wgAggregateStatsID !== false ? $wgAggregateStatsID : wfWikiID(); if ( !$socket ) { $socket = socket_create( AF_INET, SOCK_DGRAM, SOL_UDP ); @@ -2360,7 +2360,7 @@ function wfSuppressWarnings( $end = false ) { } } else { if ( !$suppressCount ) { - $originalLevel = error_reporting( E_ALL & ~( E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_DEPRECATED | E_USER_DEPRECATED ) ); + $originalLevel = error_reporting( E_ALL & ~( E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_DEPRECATED | E_USER_DEPRECATED | E_STRICT ) ); } ++$suppressCount; } @@ -2936,7 +2936,7 @@ function wfMerge( $old, $mine, $yours, &$result ) { fclose( $yourtextFile ); # Check for a conflict - $cmd = $wgDiff3 . ' -a --overlap-only ' . + $cmd = wfEscapeShellArg( $wgDiff3 ) . ' -a --overlap-only ' . wfEscapeShellArg( $mytextName ) . ' ' . wfEscapeShellArg( $oldtextName ) . ' ' . wfEscapeShellArg( $yourtextName ); @@ -2950,7 +2950,7 @@ function wfMerge( $old, $mine, $yours, &$result ) { pclose( $handle ); # Merge differences - $cmd = $wgDiff3 . ' -a -e --merge ' . + $cmd = wfEscapeShellArg( $wgDiff3 ) . ' -a -e --merge ' . wfEscapeShellArg( $mytextName, $oldtextName, $yourtextName ); $handle = popen( $cmd, 'r' ); $result = ''; @@ -3200,7 +3200,7 @@ function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1, $lowercase = t $input == '' ) { return false; } - $digitChars = ( $lowercase ) ? '0123456789abcdefghijklmnopqrstuvwxyz' : '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + $digitChars = '0123456789abcdefghijklmnopqrstuvwxyz'; $inDigits = array(); $outChars = ''; @@ -3256,6 +3256,10 @@ function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1, $lowercase = t $outChars .= '0'; } + if ( !$lowercase ) { + $outChars = strtoupper( $outChars ); + } + return strrev( $outChars ); }