debug_report_bug(getMessage('FILTER_FAILED_ALREADY_INIT'));
} // END - if
- // Init dummy array
- $filterArray = array(
- 'chains' => array(),
- 'loaded' => array(),
- 'counter' => array()
- );
-
// Load all saved filers if sql_patches is updated
if (isset($GLOBALS['cache_array']['filter']['filter_name'])) {
+ // Init dummy array
+ $filterArray = array(
+ 'chains' => array(),
+ 'loaded' => array(),
+ 'counter' => array()
+ );
+
// Found in cache so rewrite the array
foreach ($GLOBALS['cache_array']['filter']['filter_name'] as $idx => $filterName) {
// Get filter function
// Remove the cache
$GLOBALS['cache_array']['filter'] = $filterArray;
- } elseif (isExtensionInstalledAndNewer('sql_patches', '0.5.9')) {
+ } elseif ((!isInstallationPhase()) && (isExtensionInstalledAndNewer('sql_patches', '0.5.9'))) {
// Init add
$add = '';
if (getExtensionVersion('sql_patches') >= '0.6.0') $add = ", `filter_counter`";
} // END - if
// Simply add it to the array
- //* DEBUG: */ print 'filterName='.$filterName.',filterFunction='.$filterFunction.'<br />';
+ //* DEBUG: */ print __FUNCTION__.': filterName='.$filterName.',filterFunction='.$filterFunction.'<br />';
$GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = 'A';
$GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = 0;
} // END - if
// Shall we remove? (default, not while just showing an extension removal)
if ($dry_run === false) {
// Mark for filter removal
+ //* DEBUG: */ print __FUNCTION__.': filterName='.$filterName.',filterFunction='.$filterFunction.'<br />';
$GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = 'R';
} // END - if
}
// Is that filter chain there?
if (!isset($GLOBALS['cache_array']['filter']['chains'][$filterName])) {
// We should find all these non-existing filter chains
- if ($filterName != 'sql_admin_extra_data') {
- /* Only for tracking: */ debug_report_bug('Filter chain <strong>' . $filterName . '</strong> not found!');
- }
+ /* Only for tracking: */ if ($filterName != 'sql_admin_extra_data') {
+ /* Only for tracking: */ debug_report_bug('Filter chain <strong>' . $filterName . '</strong> not found!');
+ /* Only for tracking: */ }
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Filter chain ' . $filterName . ' not found!');
// Abort here and return content