]> git.mxchange.org Git - mailer.git/blobdiff - inc/filter-functions.php
Installation of extensions fixes
[mailer.git] / inc / filter-functions.php
index 5a748914271a1b72ac1c609a5df4f6409992bc4e..c75f48417eda2ff8170a372b6b188a324921d019 100644 (file)
@@ -206,6 +206,9 @@ ORDER BY
        // Handle referral banner click/view
        registerFilter(__FUNCTION__, __LINE__, 'handle_click_php', 'HANDLE_REFERRER_BANNER_CLICK');
        registerFilter(__FUNCTION__, __LINE__, 'handle_view_php', 'HANDLE_REFERRER_BANNER_VIEW');
+
+       // Generic filter to add hidden fields to formulars
+       registerFilter(__FUNCTION__, __LINE__, 'open_form_fields', 'ADD_INPUT_HIDDEN_SESSION_ID');
 }
 
 // "Registers" a new filter function
@@ -263,7 +266,7 @@ function unregisterFilter ($F, $L, $filterName, $filterFunction, $force = FALSE,
        } // END - if
 
        // Shall we remove? (default, not while just showing an extension removal)
-       if ($isDryRun === FALSE) {
+       if (($isDryRun === FALSE) && (isset($GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction]))) {
                // Mark for filter removal
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ' - REMOVE!');
                $GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = 'R';