From 4b5f75205bfb984cee46a15b9d52c1ec0f27af21 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 21 Dec 2012 09:26:18 +0100 Subject: [PATCH] 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 --- includes/GlobalFunctions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); -- 2.20.1