]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-payout.php
More rewrites to make use of (cached) wrapper functions
[mailer.git] / inc / modules / member / what-payout.php
index 1283c94854c0057fbb2df63f85018afa43a51689..edb05b80424fb096c29798ba73caf3bcfb007072 100644 (file)
@@ -77,7 +77,7 @@ WHERE
 ORDER BY
        `type` ASC",
                array($totalPoints), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) > 0) {
+       if (!SQL_HASZERONUMS($result)) {
                // Free memory
                SQL_FREERESULT($result);
 
@@ -95,9 +95,9 @@ WHERE
 ORDER BY
        p.payout_timestamp DESC",
                        array(getMemberId()), __FILE__, __LINE__);
-               if (SQL_NUMROWS($result_payouts) > 0) {
+               if (!SQL_HASZERONUMS($result_payouts)) {
                        // List all his requests
-                       $OUT = ''; $SW = 2;
+                       $OUT = '';
                        while ($content = SQL_FETCHARRAY($result_payouts)) {
                                // Translate status
                                $content['status'] = translatePayoutStatus();
@@ -118,7 +118,6 @@ ORDER BY
 
                                // Prepare data for the template
                                $content = array(
-                                       'sw'               => $SW,
                                        'target_account'   => $content['target_account'],
                                        'payout_total'     => $content['payout_total'],
                                        'target_bank'      => $content['target_bank'],
@@ -129,12 +128,11 @@ ORDER BY
 
                                // Load row template and switch colors
                                $OUT .= loadTemplate('member_payout_row', true, $content);
-                               $SW = 3 - $SW;
-                       }
+                       } // END - while
 
                        // Load template
                        loadTemplate('member_payout', false, $OUT);
-               }
+               } // END - if
 
                // Free memory
                SQL_FREERESULT($result_payouts);