From: Roland Häder Date: Wed, 4 Mar 2009 05:29:57 +0000 (+0000) Subject: Rewrites of more constants X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=5f5a73c72457ea761906640dc3d29749301102f9 Rewrites of more constants --- diff --git a/inc/check-reset.php b/inc/check-reset.php index 98e515afb7..db958c8633 100644 --- a/inc/check-reset.php +++ b/inc/check-reset.php @@ -37,17 +37,14 @@ if (!defined('__SECURITY')) { require($INC); } -// 01 2 3 32 2 3321 12 3 32 2 21 1 2 21 1 2 21 1 23 321 1 10 -if ((date("d", getConfig('last_update')) != date("d", time())) && ((!defined('mxchange_installing')) || (!mxchange_installing)) && (isInstalled()) && (isAdminRegistered()) && (!REQUEST_ISSET_GET(('register'))) && ($GLOBALS['output_mode'] != 1)) { - // Do daily things in external PHP file but only when script is completely setup - // Daily reset was run! - define('__DAILY_RESET', true); +// Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D +// 01 2 3 32 2 3321 1 221 1 221 1 221 1 23 321 1 10 +if ((date("d", getConfig('last_update')) != date("d", time())) && (!isInstalling()) && (isInstalled()) && (isAdminRegistered()) && (!REQUEST_ISSET_GET(('register'))) && ($GLOBALS['output_mode'] != 1)) { + // Tell every module we are in reset-mode! + enableResetMode(); - // Add more includes - $INC_POOL = RESET_ADD_INCLUDES(); - - // Run the filter - runFilterChain('load_includes', $INC_POOL); + // Run all includes + runResetIncludes(); } // END - if // diff --git a/inc/databases.php b/inc/databases.php index 1d69f84613..1f7f7d767d 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -98,7 +98,7 @@ define('SERVER_URL', "http://www.mxchange.org"); // Current SVN revision //define('CURR_SVN_REVISION', getActualVersion(0)); -define('CURR_SVN_REVISION', "810"); +define('CURR_SVN_REVISION', "811"); define('CURR_SVN_DATE' , getActualVersion(1)); define('CURR_SVN_VERSION' , getActualVersion(2)); diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index a9485c6070..2e8799d9c6 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -73,7 +73,7 @@ Query string:
// Debug output //* DEBUG: */ print "Query=
".$sql_string."
, affected=".SQL_AFFECTEDROWS().", numrows=".SQL_NUMROWS($result)."
\n"; - if (($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1") && (isBooleanConstantAndTrue('DEBUG_MODE')) && (isBooleanConstantAndTrue('DEBUG_SQL'))) { + if (($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1") && (isDebugModeEnabled()) && (isBooleanConstantAndTrue('DEBUG_SQL'))) { // // Debugging stuff... // diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php index cfee1ba5fb..006c3c8351 100644 --- a/inc/extensions/ext-autopurge.php +++ b/inc/extensions/ext-autopurge.php @@ -251,7 +251,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha default: // Do stuff when extension is loaded // Do we have a daily-reset-run? - if (isBooleanConstantAndTrue('__DAILY_RESET') && (!isBooleanConstantAndTrue('DEBUG_MODE')) && ($GLOBALS['output_mode'] != 1)) { + if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) { // Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts $INC_POOL[] = sprintf("%sinc/autopurge.php", constant('PATH')); } diff --git a/inc/extensions/ext-birthday.php b/inc/extensions/ext-birthday.php index 8440fbe9c5..99761ac17a 100644 --- a/inc/extensions/ext-birthday.php +++ b/inc/extensions/ext-birthday.php @@ -190,7 +190,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha break; default: // Do stuff when extension is loaded - if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (getConfig('birthday_points') > 0)) { + if ((isResetModeEnabled()) && (getConfig('birthday_points') > 0)) { // Daily reset was run and we shall pay points so we start checking for members who // has a birthday for today $INC_POOL[] = sprintf("%sinc/mails/birthday_mails.php", constant('PATH')); diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index 5cd454cb4e..0594eb1601 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -543,7 +543,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha break; default: // Do stuff when extension is loaded - if (isBooleanConstantAndTrue('__DAILY_RESET') && (!isBooleanConstantAndTrue('DEBUG_MODE')) && ($GLOBALS['output_mode'] != 1)) { + if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) { // Daily reset was run so let's check if active rallye is activated if (getConfig('bonus_active') == "Y") { // Run active rallye diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index 7168680756..3e1b249ca7 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -235,7 +235,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha break; default: // Do stuff when extension is loaded - if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (getConfig('doubler_send_mode') == "RESET")) { + if ((isResetModeEnabled()) && (getConfig('doubler_send_mode') == "RESET")) { // So let's check for points $INC_POOL[] = sprintf("%sinc/doubler_send.php", constant('PATH')); } diff --git a/inc/extensions/ext-newsletter.php b/inc/extensions/ext-newsletter.php index d1cfa7c924..176d0c9d9b 100644 --- a/inc/extensions/ext-newsletter.php +++ b/inc/extensions/ext-newsletter.php @@ -164,7 +164,7 @@ default: // Do stuff when extension is loaded '2','3','4','5','6','7','8','9' ); - if (isBooleanConstantAndTrue('__DAILY_RESET') && (!isBooleanConstantAndTrue('DEBUG_MODE')) && ($GLOBALS['output_mode'] != 1)) { + if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) { // Daily reset was run so let's check out for expired newsletter orders $INC_POOL[] = sprintf("%sinc/monthly/monthly_newsletter.php", constant('PATH')); } diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index 69385eec0a..a3b21b78cc 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -317,7 +317,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha default: // Do stuff when extension is loaded // Do daily reset only when installed and extension version is at least 0.1.1 - if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (isInstalled()) && (isAdminRegistered()) && (GET_EXT_VERSION("order") >= "0.1.1")) { + if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (GET_EXT_VERSION("order") >= "0.1.1")) { // Reset mail order values $result_ext = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__); } // END - if diff --git a/inc/extensions/ext-profile.php b/inc/extensions/ext-profile.php index 44cd9f70e0..55c69a7b29 100644 --- a/inc/extensions/ext-profile.php +++ b/inc/extensions/ext-profile.php @@ -120,7 +120,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha default: // Do stuff when extension is loaded // Do we have a daily-reset-run? - if (isBooleanConstantAndTrue('__DAILY_RESET') && (!isBooleanConstantAndTrue('DEBUG_MODE')) && ($GLOBALS['output_mode'] != 1)) { + if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) { // So let's check for profiles which needs an update $INC_POOL[] = sprintf("%sinc/profile-updte.php", constant('PATH')); } diff --git a/inc/extensions/ext-transfer.php b/inc/extensions/ext-transfer.php index d32958f037..911997a132 100644 --- a/inc/extensions/ext-transfer.php +++ b/inc/extensions/ext-transfer.php @@ -277,7 +277,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha break; default: // Do stuff when extension is loaded - if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (getConfig('ap_transfer') == "Y")) { + if ((isResetModeEnabled()) && (getConfig('ap_transfer') == "Y")) { // Automatically remove outdated or not displayed transactions TRANSFER_AUTPPURGE(getConfig('transfer_max'), getConfig('transfer_age')); } diff --git a/inc/functions.php b/inc/functions.php index e9196a01fd..d10e1f844d 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -382,7 +382,7 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) { // Output direct OUTPUT_HTML($ret); } - } elseif (isBooleanConstantAndTrue('DEBUG_MODE')) { + } elseif (isDebugModeEnabled()) { // Warning, empty output! return "E:".$template."
\n"; } @@ -435,7 +435,7 @@ function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML = "N", $FROM = "") { // Append header $FROM .= LOAD_EMAIL_TEMPLATE("header"); } - } elseif (isBooleanConstantAndTrue('DEBUG_MODE')) { + } elseif (isDebugModeEnabled()) { if (empty($FROM)) { // Load email header template $FROM = LOAD_EMAIL_TEMPLATE("header"); @@ -455,7 +455,7 @@ function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML = "N", $FROM = "") { // Fix HTML parameter (default is no!) if (empty($HTML)) $HTML = "N"; - if (isBooleanConstantAndTrue('DEBUG_MODE')) { + if (isDebugModeEnabled()) { // In debug mode we want to display the mail instead of sending it away so we can debug this part print("
 ".htmlentities(trim($FROM))."
@@ -882,7 +882,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content=array(), $UID="0") {
 

"; // Debug mode not active? Then remove the HTML tags - if (!isBooleanConstantAndTrue('DEBUG_MODE')) $newContent = strip_tags($newContent); + if (!isDebugModeEnabled()) $newContent = strip_tags($newContent); } else { // No template name supplied! $newContent = getMessage('NO_TEMPLATE_SUPPLIED'); @@ -2961,7 +2961,7 @@ function merge_array ($array1, $array2) { // Debug message logger function DEBUG_LOG ($funcFile, $line, $message, $force=true) { // Is debug mode enabled? - if ((isBooleanConstantAndTrue('DEBUG_MODE')) || ($force === true)) { + if ((isDebugModeEnabled()) || ($force === true)) { // Log this message away $fp = fopen(constant('PATH')."inc/cache/debug.log", 'a') or mxchange_die("Cannot write logfile debug.log!"); fwrite($fp, date("d.m.Y|H:i:s", time())."|".basename($funcFile)."|".$line."|".strip_tags($message)."\n"); @@ -3013,11 +3013,11 @@ function GET_DIR_AS_ARRAY ($baseDir, $prefix) { } // Load more reset scripts -function RESET_ADD_INCLUDES () { +function runResetIncludes () { // Is the reset set or old sql_patches? - if ((!defined('__DAILY_RESET')) || (EXT_VERSION_IS_OLDER("sql_patches", "0.4.5"))) { + if ((!isResetModeEnabled()) || (EXT_VERSION_IS_OLDER("sql_patches", "0.4.5"))) { // Then abort here - return array(); + DEBUG_LOG(__FUNCTION__, __LINE__, "Cannot run reset! Please report this bug. Thanks"); } // END - if // Get more daily reset scripts @@ -3050,8 +3050,8 @@ function RESET_ADD_INCLUDES () { if (!defined('DEBUG_MONTHLY')) UPDATE_CONFIG("last_month", $currMonth); } // END - if - // Return array - return $INC_POOL; + // Run the filter + runFilterChain('load_includes', $INC_POOL); } // Handle extra values @@ -3120,7 +3120,8 @@ function CONVERT_SELECTIONS_TO_TIMESTAMP(&$POST, &$DATA, &$id, &$skip) { } // END - if } else { // Process this entry - $skip = false; $test2 = ""; + $skip = false; + $test2 = ""; } } @@ -3394,6 +3395,28 @@ function isAdminRegistered () { return isBooleanConstantAndTrue('admin_registered'); } +// Enables the reset mode. Only call this function if you really want the +// reset to be run! +function enableResetMode () { + // Enable the reset mode + $GLOBALS['reset_enabled'] = true; + + // Run filters + runFilterChain('reset_enabled'); +} + +// Checks wether the reset mode is active +function isResetEnabled () { + // Now simply check it + return ((isset($GLOBALS['reset_enabled'])) && ($GLOBALS['reset_enabled'] === true)); +} + +// Checks wether the debug mode is enabled +function isDebugModeEnabled () { + // Simply check it + return isBooleanConstantAndTrue('DEBUG_MODE'); +} + ////////////////////////////////////////////////// // AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS // ////////////////////////////////////////////////// diff --git a/inc/mails/_mails.php b/inc/mails/_mails.php index d5a098a42b..2bc6aa08a2 100644 --- a/inc/mails/_mails.php +++ b/inc/mails/_mails.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode -if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return; +if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return; // ?> diff --git a/inc/mails/birthday_mails.php b/inc/mails/birthday_mails.php index c67e0ee25e..80a1f06a9e 100644 --- a/inc/mails/birthday_mails.php +++ b/inc/mails/birthday_mails.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode -if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return; +if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return; // Get current day (01 to 31), month (01 to 12) and year (4-digits year) $DAY = date("d", time()); diff --git a/inc/monthly/monthly_ b/inc/monthly/monthly_ index 729b3b8b4e..02665ce10b 100644 --- a/inc/monthly/monthly_ +++ b/inc/monthly/monthly_ @@ -41,7 +41,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if (($CSS == 1) || (defined('__DAILY_RESET'))) return; +if (($CSS == 1) || (isResetModeEnabled())) return; // ?> diff --git a/inc/monthly/monthly_beg.php b/inc/monthly/monthly_beg.php index f73fab7f71..e4c4e8e7b9 100644 --- a/inc/monthly/monthly_beg.php +++ b/inc/monthly/monthly_beg.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET')) || (getConfig('beg_rallye') != "Y")) return; +if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled()) || (getConfig('beg_rallye') != "Y")) return; //* DEBUG: */ echo basename(__FILE__)."
\n"; // Get current month (2 digits) diff --git a/inc/monthly/monthly_bonus.php b/inc/monthly/monthly_bonus.php index de78e488c7..c4c7e8d0c7 100644 --- a/inc/monthly/monthly_bonus.php +++ b/inc/monthly/monthly_bonus.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return; +if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return; //* DEBUG: */ echo basename(__FILE__)."
\n"; // Get current month (2 digits) diff --git a/inc/monthly/monthly_newsletter.php b/inc/monthly/monthly_newsletter.php index b640715803..235bbdf8a0 100644 --- a/inc/monthly/monthly_newsletter.php +++ b/inc/monthly/monthly_newsletter.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return; +if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return; //* DEBUG: */ echo basename(__FILE__)."
\n"; // Get current month (2 digits) diff --git a/inc/monthly/monthly_surfbar.php b/inc/monthly/monthly_surfbar.php index 826250915b..025d04875b 100644 --- a/inc/monthly/monthly_surfbar.php +++ b/inc/monthly/monthly_surfbar.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return; +if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return; //* DEBUG: */ echo basename(__FILE__)."
\n"; // Reset surfbar counter diff --git a/inc/pool-update.php b/inc/pool-update.php index cb2aefe1d6..ac66385eb8 100644 --- a/inc/pool-update.php +++ b/inc/pool-update.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } // Don't run on daily reset -if (defined('__DAILY_RESET')) { +if (isResetModeEnabled()) { // Skip here return false; } // END - if diff --git a/inc/pool/pool-bonus.php b/inc/pool/pool-bonus.php index e385882fb2..d52b7a64b1 100644 --- a/inc/pool/pool-bonus.php +++ b/inc/pool/pool-bonus.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } // Don't run on daily reset -if (defined('__DAILY_RESET')) { +if (isResetModeEnabled()) { // Skip here return false; } elseif (!EXT_IS_ACTIVE("bonus")) { diff --git a/inc/pool/pool-user.php b/inc/pool/pool-user.php index 2245950676..8c8e53fd4e 100644 --- a/inc/pool/pool-user.php +++ b/inc/pool/pool-user.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } // Don't run on daily reset -if (defined('__DAILY_RESET')) { +if (isResetModeEnabled()) { // Skip here return false; } elseif (!EXT_IS_ACTIVE("user")) { diff --git a/inc/reset/reset_ b/inc/reset/reset_ index f9a56e2bf3..9c5420ef9f 100644 --- a/inc/reset/reset_ +++ b/inc/reset/reset_ @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if (($CSS == 1) || (!defined('__DAILY_RESET'))) return; +if (($CSS == 1) || (!isResetModeEnabled())) return; // ?> diff --git a/inc/reset/reset_beg.php b/inc/reset/reset_beg.php index 2f18ab954e..332205253e 100644 --- a/inc/reset/reset_beg.php +++ b/inc/reset/reset_beg.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET')) || (getConfig('beg_rallye') == "Y")) return; +if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled()) || (getConfig('beg_rallye') == "Y")) return; //* DEBUG: */ echo basename(__FILE__)."
\n"; // Reset accounts diff --git a/inc/reset/reset_bonus.php b/inc/reset/reset_bonus.php index 0942e4b506..a19cb88293 100644 --- a/inc/reset/reset_bonus.php +++ b/inc/reset/reset_bonus.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return; +if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return; //* DEBUG: */ echo basename(__FILE__)."
\n"; // Purge expired entries in _bonus_turbo diff --git a/inc/reset/reset_daily.php b/inc/reset/reset_daily.php index 4862ed3d16..293a6bf05b 100644 --- a/inc/reset/reset_daily.php +++ b/inc/reset/reset_daily.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return; +if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return; //* DEBUG: */ echo basename(__FILE__)."
\n"; // Update user profiles diff --git a/inc/reset/reset_engine.php b/inc/reset/reset_engine.php index f606f1dad1..cddf64392a 100644 --- a/inc/reset/reset_engine.php +++ b/inc/reset/reset_engine.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return; +if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return; //* DEBUG: */ echo basename(__FILE__)."
\n"; // diff --git a/inc/reset/reset_holiday.php b/inc/reset/reset_holiday.php index bd197bfabb..741ebe3110 100644 --- a/inc/reset/reset_holiday.php +++ b/inc/reset/reset_holiday.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if (($GLOBALS['output_mode'] == 1) || ((!defined('__DAILY_RESET')) && (getConfig('holiday_mode') == "RESET"))) return; +if (($GLOBALS['output_mode'] == 1) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == "RESET"))) return; //* DEBUG: */ echo basename(__FILE__)."
\n"; // Check for holidays we need to enable and send email to user diff --git a/inc/reset/reset_surfbar.php b/inc/reset/reset_surfbar.php index fc73f486c3..ba109acdbb 100644 --- a/inc/reset/reset_surfbar.php +++ b/inc/reset/reset_surfbar.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return; +if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return; //* DEBUG: */ echo basename(__FILE__)."
\n"; // Reset surfbar counter diff --git a/inc/reset/reset_yoomedia.php b/inc/reset/reset_yoomedia.php index a63aa1d0e3..06d9a2c4f1 100644 --- a/inc/reset/reset_yoomedia.php +++ b/inc/reset/reset_yoomedia.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return; +if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return; // Simply reset the requests here UPDATE_CONFIG("yoomedia_requests_remain", getConfig('yoomedia_requests_total')); diff --git a/inc/weekly/weekly_ b/inc/weekly/weekly_ index aeed2d5a78..2f06942816 100644 --- a/inc/weekly/weekly_ +++ b/inc/weekly/weekly_ @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if (($CSS == 1) || (!defined('__DAILY_RESET'))) return; +if (($CSS == 1) || (!isResetModeEnabled())) return; // ?> diff --git a/inc/weekly/weekly_surfbar.php b/inc/weekly/weekly_surfbar.php index af40c37c9c..67fa973d11 100644 --- a/inc/weekly/weekly_surfbar.php +++ b/inc/weekly/weekly_surfbar.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if (($GLOBALS['output_mode'] == 1) || (!defined('__DAILY_RESET'))) return; +if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return; //* DEBUG: */ echo basename(__FILE__)."
\n"; // Reset the surfbar counter