From: Alexandre Emsenhuber Date: Fri, 21 Dec 2012 08:26:18 +0000 (+0100) Subject: Use wfWikiID() instead of $wgDBname in wfIncrStats() X-Git-Tag: 1.31.0-rc.0~21234^2 X-Git-Url: http://git.cyclocoop.org//%27http:/code.google.com/p/ie7-js//%27?a=commitdiff_plain;h=4b5f75205bfb984cee46a15b9d52c1ec0f27af21;p=lhc%2Fweb%2Fwiklou.git Use wfWikiID() instead of $wgDBname in wfIncrStats() This allows to have distinct stat groups for people using database table prefix and it makes wfIncrStats() consistent with ProfilerSimpleUDP that already uses wfWikiID(). Change-Id: Iecef9f490df8c5685a4887cc81dcb4a7e4d3172c --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index d0a20422c4..9779cb8b69 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 );