* Oracle Schema update to latest
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 7833a71..b06c1b8 100644 (file)
@@ -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 );
 }