From: Roland Häder Date: Sat, 31 Oct 2009 16:52:10 +0000 (+0000) Subject: Possible better fix X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=01546a17472ba060876c2c8a25247a8ecf0cee80;ds=sidebyside Possible better fix --- diff --git a/inc/modules/member/what-unconfirmed.php b/inc/modules/member/what-unconfirmed.php index 4ed7e8d9ce..91691d58ad 100644 --- a/inc/modules/member/what-unconfirmed.php +++ b/inc/modules/member/what-unconfirmed.php @@ -144,9 +144,11 @@ if (SQL_NUMROWS($result) > 0) { // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() while (list($id, $id2, $type) = SQL_FETCHROW($result)) { // Load data from stats table... - $cat = ''; $result_data = false; - switch ($type) - { + $cat = ''; + $result_data = false; + $PROBLEM = ''; + $DATA = $content; + switch ($type) { case 'NORMAL': $result_data = SQL_QUERY_ESC("SELECT s.subject, s.timestamp_ordered, s.cat_id, s.payment_id, p.sender @@ -159,15 +161,19 @@ ON WHERE s.id=%s LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - $type = 'mailid'; $DATA = $id; $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM'); + array(bigintval($id)), __FILE__, __LINE__); + $type = 'mailid'; + $DATA = $id; + $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM'); break; case 'BONUS': $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id, points, 0 FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", - array(bigintval($id2)), __FILE__, __LINE__); - $type = 'bonusid'; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM'); - break; + array(bigintval($id2)), __FILE__, __LINE__); + $type = 'bonusid'; + $DATA = $id2; + $PROBLEM = getMessage('BONUS_MAIL_PROBLEM'); + break; default: // Unknown type detected! logDebugMessage(__FILE__, __LINE__, sprintf("Unknown mail type %s detected.", $type)); @@ -200,7 +206,7 @@ LIMIT 1", // Prepare data for template $content = array( 'sw' => $SW, - 'userid' => getUserId(), + 'userid' => getUserId(), 'data' => bigintval($DATA), 'type' => $type, 'subject' => $subject, @@ -223,7 +229,7 @@ LIMIT 1", // Prepare data for template $content = array( 'sw' => $SW, - 'data' => $content, + 'data' => $DATA, 'probl' => $PROBLEM, );