- if (isset($GLOBALS['cache_array']['filter']['filter_name'])) {
- // Found in cache so rewrite the array
- foreach ($GLOBALS['cache_array']['filter']['filter_name'] as $idx => $filterName) {
- // Get filter function
- $filterFunction = $GLOBALS['cache_array']['filter']['filter_function'][$idx];
-
- // Add the element with mapped index
- $filterArray['counter'][$filterName][$filterFunction] = $GLOBALS['cache_array']['filter']['filter_counter'][$idx];
- $filterArray['loaded'][$filterName][$filterFunction] = true;
- $filterArray['chains'][$filterName][$filterFunction] = $GLOBALS['cache_array']['filter']['filter_active'][$idx];
- } // END - foreach
-
- // Mark filters as loaded
- $GLOBALS['cache_array']['filter'] = true;
-
- // Remove the cache
- $GLOBALS['cache_array']['filter'] = $filterArray;
- } elseif (isExtensionInstalledAndNewer('sql_patches', '0.5.9')) {
+ if ((isset($GLOBALS['cache_array']['filter']['filter_name'])) && (!isset($GLOBALS['cache_array']['filter']['chains']))) {
+ // Prepare filter array
+ prepareFilterArray();
+
+ // Mark it as initialized
+ $GLOBALS['filter_init'] = true;
+ } elseif ((!isInstallationPhase()) && (isExtensionInstalledAndNewer('sql_patches', '0.5.9'))) {