From 2bf7c8f50b53404be753c4b97ae6d9dffbb404df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 25 Nov 2009 18:20:26 +0000 Subject: [PATCH] Variable conflict solved --- inc/mysql-manager.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index b8f7fed89d..7b13a2a412 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -1944,7 +1944,7 @@ function generateReceiverList ($cat, $receiver, $mode = '') { } // Get timestamp for given stats type and data -function getTimestampFromUserStats ($type, $data, $userid = '0') { +function getTimestampFromUserStats ($statsType, $statsData, $userid = '0') { // Default timestamp is zero $data['inserted'] = '0'; @@ -1971,8 +1971,8 @@ WHERE LIMIT 1", array( bigintval($userid), - $type, - $data + $statsType, + $statsData ), __FUNCTION__, __LINE__); // Is the entry there? @@ -1989,7 +1989,7 @@ LIMIT 1", } // Inserts user stats -function insertUserStatsRecord ($userid, $type, $data) { +function insertUserStatsRecord ($userid, $statsType, $statsData) { // Is the extension installed and updated? if ((!isExtensionActive('sql_patches')) || (isExtensionOlder('sql_patches', '0.5.6'))) { // Return zero here @@ -1997,13 +1997,13 @@ function insertUserStatsRecord ($userid, $type, $data) { } // END - if // Does it exist? - if ((!getTimestampFromUserStats($type, $data, $userid)) && (!is_array($data))) { + if ((!getTimestampFromUserStats($statsType, $statsData, $userid)) && (!is_array($statsData))) { // Then insert it! SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_stats_data` (`userid`,`stats_type`,`stats_data`) VALUES (%s,'%s','%s')", - array(bigintval($userid), $type, $data), __FUNCTION__, __LINE__); - } elseif (is_array($data)) { + array(bigintval($userid), $statsType, $statsData), __FUNCTION__, __LINE__); + } elseif (is_array($statsData)) { // Invalid data! - logDebugMessage(__FUNCTION__, __LINE__, "userid={$userid},type={$type},data={".gettype($data).": Invalid statistics data type!"); + logDebugMessage(__FUNCTION__, __LINE__, "userid={$userid},type={$statsType},data={".gettype($statsData).": Invalid statistics data type!"); } } -- 2.39.5