]> git.mxchange.org Git - mailer.git/blobdiff - inc/mails/bonus_mails.php
Fix for broken confirmation
[mailer.git] / inc / mails / bonus_mails.php
index 2b9ff117c477fa7130f3fc476e62017a78633f18..6301004fdb6c663b36679801c6a8a6a455690ed5 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode
-if (getScriptOutputMode() != 0) return;
+if (!isHtmlOutputMode()) return;
 
 // Create timemark from saved month
 $mark = mktime(0, 0, 0, getConfig('last_month'), getDay(), getYear());
@@ -84,9 +84,6 @@ if (!empty($sql)) {
        // Normal notification mails or bonus mails?
        $sentBonusMails = ((getConfig('bonus_notify_points') > 0) && ($mode == 'enable') && (isExtensionActive('bonus')));
 
-       // Generate subject line
-       $subject = '{--MEMBER_BONUS_RALLYE_' . strtoupper($mode) . '_SUBJECT--}';
-
        // Load message body for bonus mails
        $message = loadEmailTemplate('bonus_enable_notify_body', '', '{PER}userid{PER}');
        $receiver = ''; $userids = array();
@@ -116,7 +113,7 @@ LIMIT 1",
                        } else {
                                // Send normal notification mail to the members
                                $message = loadEmailTemplate('bonus_' . $mode . '_notify', $content, $content['userid']);
-                               sendEmail($content['email'], $subject, $message);
+                               sendEmail($content['email'], '{--MEMBER_BONUS_RALLYE_' . strtoupper($mode) . '_SUBJECT--}', $message);
                        }
                } // END - while
 
@@ -129,7 +126,7 @@ LIMIT 1",
                        $url = 'modules.php?module=index&what=login';
 
                        // Insert mail
-                       addBonusMailToQueue($subject, $message, $receiver, getConfig('bonus_notify_points'), getConfig('bonus_notify_wait'), $url, 0, 'normal', SQL_NUMROWS($result_main));
+                       addBonusMailToQueue('{--MEMBER_BONUS_RALLYE_' . strtoupper($mode) . '_SUBJECT--}', $message, $receiver, getConfig('bonus_notify_points'), getConfig('bonus_notify_wait'), $url, 0, 'normal', SQL_NUMROWS($result_main));
                } // END - if
        } // END - if