// Clear all previous SQL queries
initSqls();
- // Are we installing?
- if ((isInstallationPhase())) {
- // Then silently skip this filter
- return true;
- } // END - if
-
// Is a database link here and not in installation mode?
- if ((!SQL_IS_LINK_UP()) && (!isInstalling())) {
+ if ((!SQL_IS_LINK_UP()) && (!isInstallationPhase())) {
// Abort here
reportBug(__FUNCTION__, __LINE__, 'No database link is up. Cannot flush filters.');
- return false;
- } // END - if
+ } elseif ((isInstallationPhase()) && (!SQL_IS_LINK_UP())) {
+ // If the link is not up in installation phase, skip flushing filters
+ return;
+ }
- // Is the extension ext-sql_patches updated?
- if ((!isExtensionInstalled('sql_patches')) || (isExtensionInstalledAndOlder('sql_patches', '0.5.9'))) {
+ // Is the extension ext-sql_patches updated and not in installation phase?
+ if ((!isInstallationPhase()) && ((!isExtensionInstalled('sql_patches')) || (isExtensionInstalledAndOlder('sql_patches', '0.5.9')))) {
// Log only in debug mode
if (isDebugModeEnabled()) {
logDebugMessage(__FUNCTION__, __LINE__, 'Cannot flush filters, sql_patches might be missing. isExtensionInstalled()=' . intval(isExtensionInstalled('sql_patches')) . ',isExtensionInstalledAndOlder()=' . intval(isExtensionInstalledAndOlder('sql_patches', '0.5.9')));
// Is there still a query left?
if (!empty($sql)) {
- // Do we have an "ALTER TABLE" command?
+ // Is there an "ALTER TABLE" command?
if (substr(strtolower($sql), 0, 11) == 'alter table') {
// Analyse the alteration command
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Alterting table: ' . $sql . ',enable_codes=' . intval($filterData['enable_codes']));
// Simply remove it
unsetExtensionSqls();
- // Do we need to remove update depency?
+ // Are there update dependencies to remove?
if (countExtensionUpdateDependencies() > 0) {
// Then find all updates we shall no longer execute
foreach (getExtensionUpdateDependencies() as $id => $ext_name) {
// Save the uncompiled code
$uncompiled = $code;
- // Do we have cache?
+ // Is there cache?
if (!isset($GLOBALS['compiled_config'][$code])) {
// Compile {?some_var?} to getConfig('some_var')
preg_match_all('/\{\?(([a-zA-Z0-9-_]+)*)\?\}/', $code, $matches);
if ((count($matches) > 0) && (count($matches[0]) > 0)) {
// Replace all matches
foreach ($matches[0] as $key => $match) {
- // Do we have cache?
+ // Is there cache?
if (!isset($GLOBALS['compile_config'][$matches[1][$key]])) {
// Is the config valid?
if (isConfigEntrySet($matches[1][$key])) {
} // END - foreach
} // END - if
- // Do we have non-HTML mode?
+ // Is there non-HTML mode?
if (!isHtmlOutputMode()) {
$filterData = decodeEntities($filterData);
} // END - if
// Handles fatal errors
function FILTER_HANDLE_FATAL_ERRORS () {
- // Do we have errors to handle and right output mode?
+ // Is there errors to handle and right output mode?
if ((!ifFatalErrorsDetected()) || (!isHtmlOutputMode())) {
// Abort executing here
return false;
return;
} // END - if
- // Do we have cached eval() data?
+ // Is there cached eval() data?
if ((isset($GLOBALS['template_eval'])) && (count($GLOBALS['template_eval']) > 0)) {
// Now flush all
- foreach ($GLOBALS['template_eval'] as $template => $eval) {
- // Flush the cache (if not yet found)
- flushTemplateCache($template, $eval);
- } // END - if
+ foreach ($GLOBALS['template_eval'] as $prefix => $templateArray) {
+ foreach ($templateArray as $template => $eval) {
+ // Flush the cache (if not yet found)
+ flushTemplateCache($prefix, $template, $eval);
+ } // END - foreach
+ } // END - foreach
} // END - if
}
return $filterData;
}
+// Filter for sending "build mail" to admin
+function FILTER_SEND_BUILD_MAIL ($filterData) {
+ // Was one line updated?
+ //if ($filterData['affected'] == 1) {
+ // Then call the proper function
+ call_user_func_array('sendGenericBuildMails', $filterData);
+ //} // END - if
+
+ // Return data
+ return $filterData;
+}
+
// [EOF]
?>