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