Further fixes for all resets
[mailer.git] / inc / functions.php
index 2d87018af23e5926d500834ec2f213aa34c2e114..0ae32cc285d5ae0374d50b71a14a1f7937b22027 100644 (file)
@@ -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.)