From: Roland Häder Date: Thu, 28 Jul 2011 23:56:02 +0000 (+0000) Subject: insertUserStatsRecord() was commented out, but still the status (true/false) is being... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6449d733d65425128f9ebc3f9d9c818c6a7e5206;p=mailer.git insertUserStatsRecord() was commented out, but still the status (true/false) is being ignored --- diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index 029ab472ff..488e8f6f4f 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -524,6 +524,9 @@ function insertUserStatsRecord ($userid, $statsType, $statsData) { return false; } // END - if + // Default is not working + $return = false; + // Does it exist? if ((!getEpocheTimeFromUserStats($statsType, $statsData, $userid)) && (!is_array($statsData))) { // Then insert it! @@ -533,10 +536,16 @@ function insertUserStatsRecord ($userid, $statsType, $statsData) { $statsType, $statsData ), __FUNCTION__, __LINE__); + + // Does it have worked? + $return = (!SQL_HASZEROAFFECTED()); } elseif (is_array($statsData)) { // Invalid data! logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',type=' . $statsType . ',data=' . gettype($statsData) . ': Invalid statistics data type!'); } + + // Return status + return $return; } // Confirms a user account diff --git a/mailid_top.php b/mailid_top.php index dbd32df25c..40ef802d41 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -239,7 +239,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr } // END - if // Insert stats record - //insertUserStatsRecord($userId, $type, $stats_data); + insertUserStatsRecord($userId, $type, $stats_data); // Right code entered? if (bigintval(postRequestParameter('gfx_check')) == $realCode) {