]> git.mxchange.org Git - mailer.git/blobdiff - inc/monthly/monthly_newsletter.php
- Daily/weekly/monthly reset completely rewritten
[mailer.git] / inc / monthly / monthly_newsletter.php
index a23eea936ab759c8b48ffd3da83e8924ad586a18..ed7eb9205b911b0e470b34fa8bfe3b564b851d34 100644 (file)
@@ -49,7 +49,7 @@ if (($CSS == 1) || (!isBooleanConstantAndTrue('__DAILY_RESET'))) return;
 // Get current month (2 digits)
 $curr = date("m", time());
 
-if ($_CONFIG['nl_month'] != $curr)
+if ($_CONFIG['last_month'] != $curr)
 {
        // Check for unsubscribed members
        $result = SQL_QUERY("SELECT userid, nl_until FROM "._MYSQL_PREFIX."_user_data WHERE nl_receive='N' ORDER BY userid", __FILE__, __LINE__);
@@ -72,12 +72,6 @@ if ($_CONFIG['nl_month'] != $curr)
 
                // Free memory
                SQL_FREERESULT($result);
-
-               // Update last month
-               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET nl_month='%s' WHERE config=0 LIMIT 1",
-                array($curr), __FILE__, __LINE__);
-
-               // Destroy cache
        }
 }