]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-transfer.php
Some more wrappers added, code cleanups:
[mailer.git] / inc / modules / member / what-transfer.php
index aad5bf37e2264d0ce4b92c8c92b96924e19162ce..85bff3a9f43dd243b03cd32f6cf0deff26d6b606 100644 (file)
@@ -62,7 +62,7 @@ if ((getUserData('opt_in') != 'Y') && ($mode == 'new')) $mode = '';
 switch ($mode) {
        case 'new': // Start new transfer
                // Get total points and subtract the balance amount from it = maximum transferable points
-               $total = countSumTotalData(getMemberId(), 'user_points', 'points')  - countSumTotalData(getMemberId(), 'user_data', 'used_points');
+               $total = getTotalPoints(getMemberId());
 
                // Remember maximum value for template
                $content['max_transferable'] = round($total - getConfig('transfer_balance') - 0.5);
@@ -222,8 +222,8 @@ switch ($mode) {
                                // @TODO Try to rewrite his to $content = SQL_FETCHARRAY(), see some lines above for two different queries
                                while (list($userid, $nick) = SQL_FETCHROW($result)) {
                                        $OUT .= "       <option value=\"".$userid."\"";
-                                       if ((isPostRequestParameterSet(('to_userid'))) && (postRequestParameter('to_userid') == $userid)) $OUT .= ' selected="selected"';
-                                       $OUT .= ">";
+                                       if ((isPostRequestParameterSet('to_userid')) && (postRequestParameter('to_userid') == $userid)) $OUT .= ' selected="selected"';
+                                       $OUT .= '>';
                                        if (($nick != $userid) && (!empty($nick))) {
                                                // Output nickname
                                                $OUT .= $nick;
@@ -231,9 +231,9 @@ switch ($mode) {
                                                // Output userid
                                                $OUT .= $userid;
                                        }
-                                       $OUT .= "</option>\n";
+                                       $OUT .= '</option>';
                                }
-                               $OUT .= "</select>\n";
+                               $OUT .= '</select>';
                                $content['to_disabled'] = '';
 
                                // Free memory