and rewritten to functions
[mailer.git] / inc / filters.php
index 1ffea5b4208a6d0d597807fa718e0cb0be955720..72c61a02c4d26ecb681240151bdc4993a961f7a3 100644 (file)
@@ -243,13 +243,13 @@ function RUN_FILTER ($filterName, $data = null, $silentAbort = true) {
 
 // Filter for flushing all new filters to the database
 function FILTER_FLUSH_FILTERS () {
-       global $filters, $counter, $link, $loadedFilters, $SQLs;
+       global $filters, $counter, $loadedFilters, $SQLs;
 
        // Clear all previous SQL queries
        $SQLs = array();
 
        // Is a database link here and not in installation mode?
-       if ((!is_resource($link)) && (!isBooleanConstantAndTrue('mxchange_installing'))) {
+       if ((!SQL_IS_LINK_UP()) && (!isBooleanConstantAndTrue('mxchange_installing'))) {
                // Abort here
                addFatalMessage(getMessage('FILTER_FLUSH_FAILED_NO_DATABASE'), array($filterFunction, $filterName));
                return false;