]> git.mxchange.org Git - mailer.git/blobdiff - inc/monthly/monthly_beg.php
Monthly beg/bonus rallye rewritten
[mailer.git] / inc / monthly / monthly_beg.php
index 35e62117a947beb87b69548936c842cbb36f6148..cc69c583b44a218b2999033d24eea9bb126c7b13 100644 (file)
@@ -78,15 +78,7 @@ LIMIT %s",
                $UIDs = "";
                while(list($uid, $email, $points) = SQL_FETCHROW($result_main)) {
                        // Add points to user's account directly
-                       $result_data = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points
-SET points=points+%s WHERE ref_depth=0 AND userid=%s 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");
 
                        // Load email template and email it away
                        $msg = LOAD_EMAIL_TEMPLATE("member_beg", $points, bigintval($uid));