'num_templates' => 0,
// 'DEFAULT_SALT_LENGTH' => 40,
// 'DEBUG_MODE' => 'N',
+ // 'DEBUG_HOURLY' => 'N',
// 'DEBUG_RESET' => 'N',
// 'DEBUG_MONTHLY' => 'N',
// 'DEBUG_WEEKLY' => 'N',
// CFG: DEBUG-SQL (Logs all queries to inc/cache/mysql.log)
//setConfigEntry('DEBUG_SQL', 'Y');
+// CFG: DEBUG-HOURLY (comment in to test hourly reset, comment out to not test)
+//setConfigEntry('DEBUG_HOURLY', 'Y');
+
// CFG: DEBUG-RESET (comment in to test daily reset, comment out to not test)
//setConfigEntry('DEBUG_RESET', 'Y');
} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
-} elseif (!isExtensionActive('sql_patches')) {
+} elseif ((!isExtensionActive('sql_patches')) || (!isExtensionActive('user'))) {
if (isDebugModeEnabled()) logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension(s) ext-sql_patches/ext-user disabled.');
return;
}
`receive_mails`=`max_mails`,
`mail_orders`=0
WHERE
- `receive_mails` != `max_mails`', __FILE__, __LINE__);
+ `receive_mails` != `max_mails`
+ ' . runFilterChain('user_exclusion_sql', ' ') . '', __FILE__, __LINE__);
} else {
// Obsolete version
SQL_QUERY('UPDATE
SET
`receive_mails`=`max_mails`
WHERE
- `receive_mails` != `max_mails`', __FILE__, __LINE__);
+ `receive_mails` != `max_mails`
+ ' . runFilterChain('user_exclusion_sql', ' ') . '', __FILE__, __LINE__);
}
// Transfer points from locked_points to points
setIncludePool('hourly', getArrayFromDirectory('inc/hourly/', 'hourly_'));
// Update database
- if ((!isConfigEntrySet('DEBUG_RESET')) || (!isDebugResetEnabled())) {
+ if ((!isConfigEntrySet('DEBUG_HOURLY')) || (!isDebugHourlyEnabled())) {
updateConfiguration('last_hour', getHour());
} // END - if
} // END - if
// Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D
- if ((((isConfigEntrySet('last_hour')) && (getConfig('last_hour') != getHour())) || (isDebugResetEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('register')) && (!isCssOutputMode())) {
+ if ((((isConfigEntrySet('last_hour')) && (getConfig('last_hour') != getHour())) || (isDebugHourlyEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('register')) && (!isCssOutputMode())) {
// Tell every module we are in reset-mode!
doHourly();
} // END - if
return $GLOBALS[__FUNCTION__];
}
+// Checks whether the debug hourly is enabled
+function isDebugHourlyEnabled () {
+ // Is cache set?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Simply check it
+ $GLOBALS[__FUNCTION__] = ((isConfigEntrySet('DEBUG_HOURLY')) && (getConfig('DEBUG_HOURLY') == 'Y'));
+ } // END - if
+
+ // Return it
+ return $GLOBALS[__FUNCTION__];
+}
+
// Checks whether the debug reset is enabled
function isDebugResetEnabled () {
// Is cache set?