]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
Prefix in SQLs fixed, fixes for first startup and weekly/monthly reset is run without...
[mailer.git] / inc / functions.php
index da1848b706f021c733159beee1c36cf3c07fb330..58eeca9c43ae353e1da93d122ac1407a0a713b27 100644 (file)
@@ -3026,28 +3026,31 @@ function runResetIncludes () {
        // Update database
        if (!defined('DEBUG_RESET')) UPDATE_CONFIG("last_update", time());
 
-       // Create current week mark
-       $currWeek = date("W", time());
-
-       // Has it changed?
-       if (getConfig('last_week') != $currWeek) {
-               // Include weekly reset scripts
-               $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY("inc/weekly/", "weekly_"));
-
-               // Update config
-               if (!defined('DEBUG_WEEKLY')) UPDATE_CONFIG("last_week", $currWeek);
-       } // END - if
+       // Is the config entry set?
+       if (GET_EXT_VERSION("sql_patches") >= "0.4.2") {
+               // Create current week mark
+               $currWeek = date("W", time());
+
+               // Has it changed?
+               if (getConfig('last_week') != $currWeek) {
+                       // Include weekly reset scripts
+                       $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY("inc/weekly/", "weekly_"));
+
+                       // Update config
+                       if (!defined('DEBUG_WEEKLY')) UPDATE_CONFIG("last_week", $currWeek);
+               } // END - if
 
-       // Create current month mark
-       $currMonth = date("m", time());
+               // Create current month mark
+               $currMonth = date("m", time());
 
-       // Has it changed?
-       if (getConfig('last_month') != $currMonth) {
-               // Include monthly reset scripts
-               $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY("inc/monthly/", "monthly_"));
+               // Has it changed?
+               if (getConfig('last_month') != $currMonth) {
+                       // Include monthly reset scripts
+                       $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY("inc/monthly/", "monthly_"));
 
-               // Update config
-               if (!defined('DEBUG_MONTHLY')) UPDATE_CONFIG("last_month", $currMonth);
+                       // Update config
+                       if (!defined('DEBUG_MONTHLY')) UPDATE_CONFIG("last_month", $currMonth);
+               } // END - if
        } // END - if
 
        // Run the filter