]> git.mxchange.org Git - mailer.git/blobdiff - inc/filters.php
Rewrote some 'manual' cache rebuilding to use rebuildCache()
[mailer.git] / inc / filters.php
index 2bfb3495874b9c252c5bda4366eac5134bb994ef..3437775a70f523623ba8ef4c234d692b208c5a7d 100644 (file)
@@ -45,21 +45,17 @@ function FILTER_FLUSH_FILTERS () {
        // 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')));