// 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')));