Countless fixes, ext-grade started:
[mailer.git] / inc / filter-functions.php
index 4d766f980ee59f7b7ad4e581242cd1390c7fdbc2..0ec69f0fb318f4701ebf997779aaae6aa08a2245 100644 (file)
@@ -58,7 +58,9 @@ function initFilterSystem () {
        } elseif ((!isInstallationPhase()) && (isExtensionInstalledAndNewer('sql_patches', '0.5.9'))) {
                // Init add
                $add = '';
-               if (isExtensionINstalledAndNewer('sql_patches', '0.6.0')) $add = ", `filter_counter`";
+               if (isExtensionINstalledAndNewer('sql_patches', '0.6.0')) {
+                       $add = ", `filter_counter`";
+               } // END - if
 
                // Load all filters
                $result = SQL_QUERY('SELECT
@@ -133,6 +135,7 @@ ORDER BY
        registerFilter('post_extension_installed', 'SOLVE_TASK');
        registerFilter('post_extension_installed', 'LOAD_INCLUDES');
        registerFilter('post_extension_installed', 'REMOVE_UPDATES');
+       registerFilter('post_extension_installed', 'EXTENSION_MARK_INSTALLED');
 
        // Solving tasks
        registerFilter('solve_task', 'SOLVE_TASK');
@@ -225,7 +228,7 @@ function registerFilter ($filterName, $filterFunction, $silentAbort = true, $for
 
 // "Unregisters" a filter from the given chain
 function unregisterFilter ($F, $L, $filterName, $filterFunction, $force = false, $dry_run = false) {
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY: F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',dry_run=' . intval($dry_run) . ' - ENTERED!');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',dry_run=' . intval($dry_run) . ' - ENTERED!');
 
        // Extend the filter function name only if not loaded from database
        if (!isset($GLOBALS['cache_array']['filter']['loaded'][$filterName][$filterFunction])) {
@@ -242,11 +245,11 @@ function unregisterFilter ($F, $L, $filterName, $filterFunction, $force = false,
        // Shall we remove? (default, not while just showing an extension removal)
        if ($dry_run === false) {
                // Mark for filter removal
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'REMOVE: F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction);
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ' - REMOVE!');
                $GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = 'R';
        } // END - if
 
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY: F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',dry_run=' . intval($dry_run) . ' - EXIT!');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',dry_run=' . intval($dry_run) . ' - EXIT!');
 }
 
 // "Runs" the given filters, filterData is optional and can be any type of data