// Load more hourly reset scripts
function FILTER_RUN_HOURLY_INCLUDES () {
// Is the reset set or old sql_patches?
- if (((!isHourlyResetEnabled()) || (!isExtensionInstalledAndNewer('sql_patches', '0.7.5'))) && (isHtmlOutputMode())) {
+ if (((!isHourlyResetEnabled()) || (!isExtensionInstalledAndNewer('sql_patches', '0.9.8'))) && (isHtmlOutputMode())) {
// Then abort here
- reportBug(__FUNCTION__, __LINE__, 'Cannot run hourly reset! enabled='.intval(isHourlyResetEnabled()).',ext='.intval(isExtensionInstalledAndNewer('sql_patches', '0.9.8')).' Please report this bug. Thanks');
+ reportBug(__FUNCTION__, __LINE__, 'Cannot run hourly reset! enabled='.intval(isHourlyResetEnabled()).',isExtensionInstalledAndNewer='.intval(isExtensionInstalledAndNewer('sql_patches', '0.9.8')).' Please report this bug. Thanks');
} // END - if
- // Is the config entry set?
- if (isExtensionInstalledAndNewer('sql_patches', '0.7.5')) {
- // Get more hourly reset scripts
- setIncludePool('hourly', getArrayFromDirectory('inc/hourly/', 'hourly_'));
-
- // Update database
- if ((!isConfigEntrySet('DEBUG_HOURLY')) || (!isDebugHourlyEnabled())) {
- updateConfiguration('last_hourly', getHour());
- } // END - if
+ // Is ext-sql_patches at least 0.9.8?
+ if (isExtensionInstalledAndNewer('sql_patches', '0.9.8')) {
+ // Has it changed?
+ if ((getLastHourly() != getHour()) || (isDebugHourlyEnabled())) {
+ // Get more hourly reset scripts
+ setIncludePool('hourly', getArrayFromDirectory('inc/hourly/', 'hourly_'));
// Run the filter
runFilterChain('load_includes', 'hourly');
+ } // END - if
} // END - if
}
// Is the reset set or old sql_patches?
if (((!isDailyResetEnabled()) || (!isExtensionInstalledAndNewer('sql_patches', '0.9.8'))) && (isHtmlOutputMode())) {
// Then abort here
- reportBug(__FUNCTION__, __LINE__, 'Cannot run daily reset! enabled='.intval(isDailyResetEnabled()).',ext='.intval(isExtensionInstalledAndNewer('sql_patches', '0.9.8')).' Please report this bug. Thanks');
+ reportBug(__FUNCTION__, __LINE__, 'Cannot run daily reset! enabled='.intval(isDailyResetEnabled()).',isExtensionInstalledAndNewer='.intval(isExtensionInstalledAndNewer('sql_patches', '0.9.8')).' Please report this bug. Thanks');
} // END - if
- // Get more daily reset scripts
- setIncludePool('daily', getArrayFromDirectory('inc/daily/', 'daily_'));
+ // Is ext-sql_patches at least 0.9.8?
+ if (isExtensionInstalledAndNewer('sql_patches', '0.9.8')) {
+ // Has it changed?
+ if ((getLastDaily() != getDay()) || (isDebugDailyEnabled())) {
+ // Get more daily reset scripts
+ setIncludePool('daily', getArrayFromDirectory('inc/daily/', 'daily_'));
- // Update configuration if this reset is not being debugged
- if (!isDebugDailyEnabled()) {
- updateConfiguration('last_daily', getDay());
+ // Run the filter
+ runFilterChain('load_includes', 'daily');
+ } // END - if
} // END - if
-
- // Run the filter
- runFilterChain('load_includes', 'daily');
}
// Load more weeklt scripts
function FILTER_RUN_WEEKLY_INCLUDES () {
// Is the reset set or old sql_patches?
- if (((!isWeeklyResetDebugEnabled()) || (!isExtensionInstalledAndNewer('sql_patches', '0.9.8'))) && (isHtmlOutputMode())) {
+ if (((!isWeeklyResetEnabled()) || (!isExtensionInstalledAndNewer('sql_patches', '0.9.8'))) && (isHtmlOutputMode())) {
// Then abort here
- reportBug(__FUNCTION__, __LINE__, 'Cannot run weekly reset! enabled='.intval(isWeeklyResetDebugEnabled()).',ext='.intval(isExtensionInstalledAndNewer('sql_patches', '0.9.8')).' Please report this bug. Thanks');
+ reportBug(__FUNCTION__, __LINE__, 'Cannot run weekly reset! enabled='.intval(isWeeklyResetEnabled()).',isExtensionInstalledAndNewer()='.intval(isExtensionInstalledAndNewer('sql_patches', '0.9.8')).' Please report this bug. Thanks');
} // END - if
- // Is the config entry set?
- if (isExtensionInstalledAndNewer('sql_patches', '0.4.2')) {
+ // Is ext-sql_patches at least 0.9.8?
+ if (isExtensionInstalledAndNewer('sql_patches', '0.9.8')) {
// Has it changed?
- if (((isConfigEntrySet('last_weekly')) && (getLastWeekly() != getWeek())) || (isWeeklyResetDebugEnabled())) {
+ if ((getLastWeekly() != getWeek()) || (isDebugWeeklyEnabled())) {
// Include weekly reset scripts
setIncludePool('weekly', getArrayFromDirectory('inc/weekly/', 'weekly_'));
- // Update configuration if this reset is not being debugged
- if (!isWeeklyResetDebugEnabled()) {
- updateConfiguration('last_weekly', getWeek());
- } // END - if
+ // Run the filter
+ runFilterChain('load_includes', 'weekly');
} // END - if
-
- // Run the filter
- runFilterChain('load_includes', 'weekly');
} // END - if
}
// Load more monthly scripts
function FILTER_RUN_MONTHLY_INCLUDES () {
// Is the reset set or old sql_patches?
- if (((!isMonthlyResetDebugEnabled()) || (!isExtensionInstalledAndNewer('sql_patches', '0.9.8'))) && (isHtmlOutputMode())) {
+ if (((!isMonthlyResetEnabled()) || (!isExtensionInstalledAndNewer('sql_patches', '0.9.8'))) && (isHtmlOutputMode())) {
// Then abort here
- reportBug(__FUNCTION__, __LINE__, 'Cannot run monthly reset! enabled='.intval(isMonthlyResetDebugEnabled()).',ext='.intval(isExtensionInstalledAndNewer('sql_patches', '0.9.8')).' Please report this bug. Thanks');
+ reportBug(__FUNCTION__, __LINE__, 'Cannot run monthly reset! enabled='.intval(isMonthlyResetEnabled()).',isExtensionInstalledAndNewer='.intval(isExtensionInstalledAndNewer('sql_patches', '0.9.8')).' Please report this bug. Thanks');
} // END - if
- // Is the config entry set?
- if (isExtensionInstalledAndNewer('sql_patches', '0.4.2')) {
- // Create current month mark
- $currMonth = getMonth();
-
+ // Is ext-sql_patches at least 0.9.8?
+ if (isExtensionInstalledAndNewer('sql_patches', '0.9.8')) {
// Has it changed?
- if ((getLastMonthly() != $currMonth) || (isMonthlyResetDebugEnabled())) {
+ if ((getLastMonthly() != getMonth()) || (isDebugMonthlyEnabled())) {
// Include monthly reset scripts
setIncludePool('monthly', getArrayFromDirectory('inc/monthly/', 'monthly_'));
- // Update configuration if this reset is not being debugged
- if (!isMonthlyResetDebugEnabled()) {
- updateConfiguration('last_monthly', $currMonth);
- } // END - if
+ // Run the filter
+ runFilterChain('load_includes', 'monthly');
} // END - if
} // END - if
-
- // Run the filter
- runFilterChain('load_includes', 'monthly');
}
// Filter for removing the given extension
} // END - if
// Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getLastHourly()=' . getLastHourly() . ',getHour()=' . getHour());
if (((getLastHourly() != getHour()) || (isDebugHourlyEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('setup')) && (!isCssOutputMode())) {
// Tell every module we are in reset-mode!
doHourly();
} // END - if
// Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getLastDaily()=' . getLastDaily() . ',getDay()=' . getDay());
if (((getLastDaily() != getDay()) || (isDebugDailyEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('setup')) && (!isCssOutputMode())) {
// Tell every module we are in reset-mode!
doDaily();
} // END - if
// Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getLastWeekly()=' . getLastWeekly() . ',getWeek()=' . getWeek());
if (((getLastWeekly() != getWeek()) || (isDebugWeeklyEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('setup')) && (!isCssOutputMode())) {
// Tell every module we are in reset-mode!
doWeekly();
} // END - if
// Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getLastMonthly()=' . getLastMonthly() . ',getMonth()=' . getMonth());
if (((getLastMonthly() != getMonth()) || (isDebugMonthlyEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('setup')) && (!isCssOutputMode())) {
// Tell every module we are in reset-mode!
doMonthly();