More rewrites to make use of (cached) wrapper functions
[mailer.git] / inc / modules / admin / what-list_payouts.php
index 4fa53756a50802615fb9320f5982824fabf9a9fb..7e10f9a4f7eb3c7cc1a116e53da7c8ffb72cf16c 100644 (file)
@@ -152,7 +152,7 @@ LIMIT 1",
                                                }
 
                                                // Finally send mail
-                                               sendEmail(getUserData('email'), getMessage('MEMBER_PAYOUT_ACCEPTED_SUBJECT'), $message);
+                                               sendEmail(getUserData('email'), '{--MEMBER_PAYOUT_ACCEPTED_SUBJECT--}', $message);
                                        } else {
                                                // Something goes wrong... :-(
                                                $content = implode('<br />', $ret);
@@ -192,7 +192,7 @@ LIMIT 1",
                                loadTemplate('admin_settings_saved', false, '{--ADMIN_PAYOUT_REJECTED_NOTIFIED--}');
 
                                // Finally send mail
-                               sendEmail(getUserData('email'), getMessage('MEMBER_PAYOUT_REJECTED_SUBJECT'), $message);
+                               sendEmail(getUserData('email'), '{--MEMBER_PAYOUT_REJECTED_SUBJECT--}', $message);
                        } else {
                                // Prepare content
                                $content = array(
@@ -233,9 +233,9 @@ ON
 ORDER BY
        p.payout_timestamp DESC", __FILE__, __LINE__);
 
-       if (SQL_NUMROWS($result) > 0) {
+       if (!SQL_HASZERONUMS($result)) {
                // List found payouts
-               $OUT = ''; $SW = 2;
+               $OUT = '';
                while ($content = SQL_FETCHARRAY($result)) {
                        if ($content['status'] == 'NEW') {
                                // Generate links for direct accepting and rejecting
@@ -259,19 +259,13 @@ ORDER BY
 
                                // Admins can addionally test the URL for framekillers
                                $content['target_bank'] = '<a href="' . generateFrametesterUrl($content['url']) . '" target="_blank">{--CLICK_HERE--}</a>';
-                       } else {
-                               // e-currency payout request
-                               if (empty($content['target_account'])) $content['target_account'] = '---';
-                               if (empty($content['target_bank']))    $content['target_bank']    = '---';
-                       }
+                       } // END - if
 
                        // Add/Translate some data
-                       $content['sw']               = $SW;
                        $content['payout_timestamp'] = generateDateTime($content['payout_timestamp'], 2);
 
                        // Add row and switch color
                        $OUT .= loadTemplate('admin_list_payouts_row', true, $content);
-                       $SW = 3 - $SW;
                } // END - while
 
                // Free memory