]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
Further fixes for all resets
[mailer.git] / inc / functions.php
index 02e0b7a5e8656e43a35364df04cdf217b5f4579e..0ae32cc285d5ae0374d50b71a14a1f7937b22027 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -1629,6 +1629,12 @@ function doHourly () {
 
        // Run filters (one always!)
        runFilterChain('hourly');
+
+       // Do not update in hourly debug mode
+       if ((!isConfigEntrySet('DEBUG_HOURLY')) || (!isDebugHourlyEnabled())) {
+               // Update database
+               updateConfiguration('last_hourly', getHour());
+       } // END - if
 }
 
 // Enables the daily reset mode and runs it
@@ -1638,6 +1644,12 @@ function doDaily () {
 
        // Run filters
        runFilterChain('daily');
+
+       // Do not update in daily debug mode
+       if ((!isConfigEntrySet('DEBUG_DAILY')) || (!isDebugDailyEnabled())) {
+               // Update database
+               updateConfiguration('last_daily', getDay());
+       } // END - if
 }
 
 // Enables the weekly reset mode and runs it
@@ -1647,6 +1659,12 @@ function doWeekly () {
 
        // Run filters
        runFilterChain('weekly');
+
+       // Do not update in weekly debug mode
+       if ((!isConfigEntrySet('DEBUG_WEEKLY')) || (!isDebugWeeklyEnabled())) {
+               // Update database
+               updateConfiguration('last_weekly', getWeek());
+       } // END - if
 }
 
 // Enables the monthly reset mode and runs it
@@ -1656,6 +1674,12 @@ function doMonthly () {
 
        // Run filters
        runFilterChain('monthly');
+
+       // Do not update in monthly debug mode
+       if ((!isConfigEntrySet('DEBUG_MONTHLY')) || (!isDebugMonthlyEnabled())) {
+               // Update database
+               updateConfiguration('last_monthly', getMonth());
+       } // END - if
 }
 
 // Shuts down the mailer (e.g. closing database link, flushing output/filters, etc.)