X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fdoubler_send.php;h=f3084e22a554fd93707a8710fc24c15cced91e69;hp=782af6b03d47df7831bb768271ba951429a36918;hb=7f104f6fe558bb56b4205241435a2357c2feece1;hpb=963e55ca1ea79e255f235e359cde9f7862191dc5 diff --git a/inc/doubler_send.php b/inc/doubler_send.php index 782af6b03d..f3084e22a5 100644 --- a/inc/doubler_send.php +++ b/inc/doubler_send.php @@ -107,19 +107,10 @@ if (((SQL_NUMROWS($result_total) > 0) && ($_CONFIG['doubler_sent_all'] == "Y")) } // Exclude webmaster from doubling... - if ($uid != $_CONFIG['doubler_uid']) - { + if ($uid != $_CONFIG['doubler_uid']) { // Add points - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s WHERE userid=%s AND ref_depth=0 LIMIT 1", - array($points, bigintval($uid)), __FILE__, __LINE__); - - // Update mediadata as well - if (GET_EXT_VERSION("mediadata") >= "0.0.4") - { - // Update database - MEDIA_UPDATE_ENTRY(array("total_points"), "add", $points); - } - } + ADD_POINTS_REFSYSTEM($uid, $points, false, "0", false, "direct"); + } // END - if // Set entry as "payed" $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_doubler SET completed='Y' WHERE id=%s LIMIT 1", @@ -150,7 +141,7 @@ if (((SQL_NUMROWS($result_total) > 0) && ($_CONFIG['doubler_sent_all'] == "Y")) // Update doubler's account only when others are not updated if (!$OK) { // Add points to used doubler points - UPDATE_CONFIG("douber_used", $points, "+"); + UPDATE_CONFIG("doubler_used", $points, "+"); } // Update variables to prevent errors