]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
Hotfix for counting refback points
[mailer.git] / inc / mysql-manager.php
index 84d2a4ddbfee90768fd295b2aebe63f4ff7cd29f..26e6870c0c059400f990685bfa05df85f31c44e7 100644 (file)
@@ -1293,6 +1293,10 @@ function ADD_REFBACK_POINTS ($uid, $ref, $points) {
                        //* DEBUG: */ echo __FUNCTION__.":refback={$refback}<br />\n";
                        ADD_POINTS_REFSYSTEM($uid, $refback, false, "0", false, "direct");
 
+                       // Update refback table
+                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_refs SET points=points+%s WHERE userid=%s AND refid=%s LIMIT 1",
+                               array($refback, $uid, $refid), __FILE__, __LINE__);
+
                        // Reduce points if refid is found
                        if ($refid == $ref) {
                                // Reduce points here!