Variable conflict solved
authorRoland Häder <roland@mxchange.org>
Wed, 25 Nov 2009 18:20:26 +0000 (18:20 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 25 Nov 2009 18:20:26 +0000 (18:20 +0000)
inc/mysql-manager.php

index b8f7fed89dcadc6667875e66a236c4b425cc6324..7b13a2a412809f0ce95bcccc1e1112e16302f81b 100644 (file)
@@ -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!");
        }
 }