]> git.mxchange.org Git - mailer.git/blobdiff - inc/filters.php
Added debug line
[mailer.git] / inc / filters.php
index 54e697ad99f475bc649eefe96455f73451e513a8..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')));
@@ -1228,5 +1224,14 @@ function FILTER_GENERATE_FILE_SECRET_HASH ($filterData) {
        return $filterData;
 }
 
+// Filter to initialize session
+function FILTER_INIT_SESSION ($filterData) {
+       // Determine and set referral id
+       determineReferralId();
+
+       // Return data
+       return $filterData;
+}
+
 // [EOF]
 ?>