Resets debugable
authorRoland Häder <roland@mxchange.org>
Mon, 6 Oct 2008 23:20:03 +0000 (23:20 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 6 Oct 2008 23:20:03 +0000 (23:20 +0000)
inc/config.php
inc/databases.php
inc/functions.php
inc/reset/reset_daily.php

index 897b03aa862db2b203a9effa43cae9dddc7173b3..644925084c15df31741f7d77b89068b68cd9c988 100644 (file)
@@ -110,6 +110,18 @@ define('frameset_active', false);
 // CFG: DEBUG-MODE (if enabled all mails will be *displayed* and *not* send!)
 define('DEBUG_MODE', false);
 
+// CFG: DEBUG-MAIL (turn this on if you need to debug mails, only affects if DEBUG_MODE is true)
+//define('DEBUG_MAIL', true);
+
+// CFG: DEBUG-RESET (comment in to test daily reset, comment out to not test)
+//define('DEBUG_RESET', true);
+
+// CFG: DEBUG-MONTHLY (comment in to test monthly reset, comment out to not test)
+//define('DEBUG_MONTHLY', true);
+
+// CFG: DEBUG-WEEKLY (comment in to test weekly reset, comment out to not test)
+//define('DEBUG_WEEKLY', true);
+
 // When we are not installing
 if (!defined('mxchange_installing')) define('mxchange_installing', false);
 
index 64fd579e14e7b674dcd4ce954d24254f535c352c..1ec95e0dfc7d304831d9a9399386151de1730eaa 100644 (file)
@@ -113,7 +113,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "467");
+define('CURR_SVN_REVISION', "468");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index b9369d3ebcfab2aa0a985c25b2c9059783eebd21..28ecf9e432de2d93a6374fba939db375243dac24 100644 (file)
@@ -2390,6 +2390,9 @@ function RESET_ADD_INCLUDES () {
        // Get more daily reset scripts
        $INC_POOL = GET_DIR_AS_ARRAY(PATH."inc/reset/", "reset_");
 
+       // Update database
+       if (!defined('DEBUG_RESET')) UPDATE_CONFIG("last_update", time());
+
        // Create current week mark
        $currWeek = date("W", time());
 
@@ -2399,7 +2402,7 @@ function RESET_ADD_INCLUDES () {
                $INC_POOL = array_merge($INC_POOL, GET_DIR_AS_ARRAY(PATH."inc/weekly/", "weekly_"));
 
                // Update config
-               UPDATE_CONFIG("last_week", $currWeek);
+               if (!defined('DEBUG_WEEKLY')) UPDATE_CONFIG("last_week", $currWeek);
        } // END - if
 
        // Create current month mark
@@ -2411,7 +2414,7 @@ function RESET_ADD_INCLUDES () {
                $INC_POOL = array_merge($INC_POOL, GET_DIR_AS_ARRAY(PATH."inc/monthly/", "monthly_"));
 
                // Update config
-               UPDATE_CONFIG("last_month", $currMonth);
+               if (!defined('DEBUG_MONTHLY')) UPDATE_CONFIG("last_month", $currMonth);
        } // END - if
 
        // Return array
index d0ee83a5a2894f0f0f0487bf190e6cf5b3ec9a00..59df1fb8ced23b2753b0e69484cd23d7d669829a 100644 (file)
@@ -89,11 +89,5 @@ WHERE userid=%s AND ref_depth=%d LIMIT 1",
 // Free memory
 SQL_FREERESULT($result_daily);
 
-// Save config value for later references
-$_CONFIG['last_update'] = time();
-
-// Update database
-UPDATE_CONFIG("last_update", time());
-
 //
 ?>