X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fdoubler_send.php;h=a6ee2d0a49d8679894a50ba10d74cade267933a0;hb=6822d852b1eebf903029dc8218ade7778c0a331e;hp=c3ccc8dcf3c07df1a54d5371544a8e251acc7c93;hpb=e1653405d28923c78b2e292125306ccf61138f24;p=mailer.git diff --git a/inc/doubler_send.php b/inc/doubler_send.php index c3ccc8dcf3..a6ee2d0a49 100644 --- a/inc/doubler_send.php +++ b/inc/doubler_send.php @@ -112,7 +112,7 @@ if (((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == 'Y')) | if ($uid != $CONFIG['doubler_uid']) { // Add points - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s WHERE userid=%d AND ref_depth='0' LIMIT 1", + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s WHERE userid=%d AND ref_depth=0 LIMIT 1", array($points, bigintval($uid)), __FILE__, __LINE__); // Update mediadata as well @@ -132,9 +132,8 @@ if (((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == 'Y')) | if (($jackpot > 0) && ($jackpot >= $points) && ($CONFIG['doubler_jackpot'] == 'Y')) { // Subtract points from jackpot - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_jackpot SET points=points-%s WHERE ok='ok' LIMIT 1", - array($points), __FILE__, __LINE__); - $jackpot -= $jackpot; + SUB_JACKPOT($points); + $jackpot -= $points; // Okay, done! $OK = true;