- $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($DATA[1])), __FILE__, __LINE__);
-
- // Update mediadata as well
- if (GET_EXT_VERSION("mediadata") >= "0.0.4")
- {
- // Update database
- //* DEBUG: */ echo "*MEDIA/L:".__LINE__."/".$points."*<br />";
- MEDIA_UPDATE_ENTRY(array("total_points"), "add", $points);
- }
+ ADD_POINTS_REFSYSTEM($DATA[1], $points, false, "0", false, "direct");