Huge rewrite:
[mailer.git] / inc / modules / member / what-transfer.php
index 0b41f308022bb17f116825c2c83ea1f128c08285..4ca56fe99664c6ef8488d810d0c9729ddedf9a1a 100644 (file)
@@ -187,12 +187,12 @@ switch ($mode) {
                                SUB_POINTS('transfer', getUserId(), REQUEST_POST('points'));
 
                                // First send email to recipient
-                               $msg = LOAD_EMAIL_TEMPLATE('member_transfer_recipient', '', constant('__RECIPIENT_UID'));
-                               sendEmail(constant('__RECIPIENT_EMAIL'), getMessage('TRANSFER_MEMBER_RECIPIENT_SUBJ') . ': ' . $SENDER, $msg);
+                               $message = LOAD_EMAIL_TEMPLATE('member_transfer_recipient', '', constant('__RECIPIENT_UID'));
+                               sendEmail(constant('__RECIPIENT_EMAIL'), getMessage('TRANSFER_MEMBER_RECIPIENT_SUBJ') . ': ' . $SENDER, $message);
 
                                // Second send email to sender
-                               $msg = LOAD_EMAIL_TEMPLATE('member_transfer_sender', '', constant('__SENDER_UID'));
-                               sendEmail(constant('__SENDER_EMAIL'), getMessage('TRANSFER_MEMBER_SENDER_SUBJ') . ': ' . $RECIPIENT, $msg);
+                               $message = LOAD_EMAIL_TEMPLATE('member_transfer_sender', '', constant('__SENDER_UID'));
+                               sendEmail(constant('__SENDER_EMAIL'), getMessage('TRANSFER_MEMBER_SENDER_SUBJ') . ': ' . $RECIPIENT, $message);
 
                                // At last send admin mail(s)
                                $ADMIN_SUBJ = sprintf("%s (%s->%s)", getMessage('TRANSFER_ADMIN_SUBJECT'), $SENDER, $RECIPIENT);
@@ -377,13 +377,13 @@ switch ($mode) {
                //
                // First of all create the temporary table
                $result = SQL_QUERY("CREATE TEMPORARY TABLE `{!_MYSQL_PREFIX!}_transfers_tmp` (
-trans_id VARCHAR(12) NOT NULL DEFAULT '',
-party_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
-points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
-reason VARCHAR(255) NOT NULL DEFAULT '',
-time_trans VARCHAR(10) NOT NULL DEFAULT '0',
-trans_type ENUM('IN','OUT') NOT NULL DEFAULT 'IN',
-KEY(party_uid)
+`trans_id` VARCHAR(12) NOT NULL DEFAULT '',
+`party_uid` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+`points` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+`reason` VARCHAR(255) NOT NULL DEFAULT '',
+`time_trans` VARCHAR(10) NOT NULL DEFAULT '0',
+`trans_type` ENUM('IN','OUT') NOT NULL DEFAULT 'IN',
+KEY(`party_uid`)
 ) TYPE=HEAP", __FILE__, __LINE__);
 
                // Let's begin with the incoming list
@@ -393,7 +393,7 @@ KEY(party_uid)
                        $DATA[] = 'IN';
                        $DATA = implode("','", $DATA);
                        $res_temp = SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_transfers_tmp` (`trans_id`, `party_uid`, `points`, `reason`, `time_trans`, `trans_type`) VALUES ('".$DATA."')", __FILE__, __LINE__);
-               }
+               } // END - while
 
                // Free memory
                SQL_FREERESULT($result);