Rewrites from to , fixes
[mailer.git] / inc / mails / bonus_mails.php
index edd37ab9176c3770b4849c8955659a8bd4bd9e9d..568a2f0f98e116f2cd0cd160e8122c7ca5578d55 100644 (file)
@@ -98,10 +98,16 @@ if (!empty($sql)) {
                while ($content = SQL_FETCHARRAY($result_main)) {
                        // Update account
                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data`
-SET bonus_ral_notify='%s', bonus_ral_%s_notify='%s'
-WHERE `userid`=%s
+SET
+       `bonus_ral_notify`=UNIX_TIMESTAMP(),
+       `bonus_ral_%s_notify`=UNIX_TIMESTAMP()
+WHERE
+       `userid`=%s
 LIMIT 1",
-                       array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__);
+                               array(
+                                       $mode,
+                                       $content['userid']
+                               ), __FILE__, __LINE__);
 
                        // Load email template and send it to the user!
                        if ($sentBonusMails === true) {
@@ -109,7 +115,7 @@ LIMIT 1",
                                $UIDs[] = $content['userid'];
                        } else {
                                // Send normal notification mail to the members
-                               $message = loadEmailTemplate('bonus_' . $mode . '_notify', array(), $content['userid']);
+                               $message = loadEmailTemplate('bonus_' . $mode . '_notify', $content, $content['userid']);
                                sendEmail($content['email'], $subject, $message);
                        }
                } // END - while