* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
array('allow_direct_pay', 'ref_payout'),
array(postRequestElement('allow_direct_pay'), $REF)
);
- if ((getConfig('ref_payout') == '0') && (postRequestElement('ref_payout') > 0)) {
+ if ((getRefPayout() == '0') && (postRequestElement('ref_payout') > 0)) {
// Update account's ref_payout for "must-confirm"
- addSql(sprintf("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=(%s - `mails_confirmed`)
+ addSql(sprintf("UPDATE
+ `{?_MYSQL_PREFIX?}_user_data`
+SET
+ `ref_payout`=(%s - `mails_confirmed`)
WHERE
`mails_confirmed` < %s", $REF, $REF));
- } elseif ((getConfig('ref_payout') > 0) && (postRequestElement('ref_payout') == '0')) {
+ } elseif ((getRefPayout() > 0) && (postRequestElement('ref_payout') == '0')) {
// Update account's ref_payout for "not-must-confirm"
addSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=0 WHERE `ref_payout` > 0");
+ // @TODO Rewrite these two lines for new user_points columns (e.g. locked_order_points) with a filter
addSql("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `points`=`points`+`locked_points` WHERE `locked_points` > 0");
addSql("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `locked_points`=0 WHERE `locked_points` > 0");
}