// Add entries to both tables
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_transfers_in` (`userid`, `from_userid`, `points`, `reason`, `time_trans`, `trans_id`) VALUES (%s,%s,%s,'%s', UNIX_TIMESTAMP(),%s)",
- array(bigintval(postRequestParameter('to_userid')), getMemberId(), bigintval(postRequestParameter('points')), postRequestParameter('reason'), $content['trans_id']), __FILE__, __LINE__);
+ array(
+ bigintval(postRequestParameter('to_userid')),
+ getMemberId(),
+ bigintval(postRequestParameter('points')),
+ postRequestParameter('reason'),
+ $content['trans_id']
+ ), __FILE__, __LINE__);
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_transfers_out` (`userid`, `to_userid`, `points`, `reason`, `time_trans`, `trans_id`) VALUES (%s,%s,%s,'%s', UNIX_TIMESTAMP(),%s)",
- array(getMemberId(), bigintval(postRequestParameter('to_userid')), bigintval(postRequestParameter('points')), postRequestParameter('reason'), $content['trans_id']), __FILE__, __LINE__);
+ array(
+ getMemberId(),
+ bigintval(postRequestParameter('to_userid')),
+ bigintval(postRequestParameter('points')),
+ postRequestParameter('reason'),
+ $content['trans_id']
+ ), __FILE__, __LINE__);
// Add points to account *directly* ...
- addPointsDirectly('transfer', bigintval(postRequestParameter('to_userid')), bigintval(postRequestParameter('points')));
+ addPointsThroughReferalSystem('transfer', bigintval(postRequestParameter('to_userid')), bigintval(postRequestParameter('points')));
// ... and add it to current user's used points
subtractPoints('transfer', getMemberId(), postRequestParameter('points'));