]> git.mxchange.org Git - mailer.git/commitdiff
Possible better fix
authorRoland Häder <roland@mxchange.org>
Sat, 31 Oct 2009 16:52:10 +0000 (16:52 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 31 Oct 2009 16:52:10 +0000 (16:52 +0000)
inc/modules/member/what-unconfirmed.php

index 4ed7e8d9cecdcaedf9c2e4dd2b72f59fdb0c07f2..91691d58adf4ff340f7720fb000b4705d975892e 100644 (file)
@@ -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,
                        );