X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ffilter-functions.php;h=c75f48417eda2ff8170a372b6b188a324921d019;hb=4b302a852a46c840cffcf10a5897459895f377a3;hp=accd0c9475fa66feb6446ac8ea3ad754267a4e92;hpb=ed91696103e27286d50d5dcd9e6b6a6184dd3f16;p=mailer.git diff --git a/inc/filter-functions.php b/inc/filter-functions.php index accd0c9475..c75f48417e 100644 --- a/inc/filter-functions.php +++ b/inc/filter-functions.php @@ -114,11 +114,15 @@ ORDER BY registerFilter(__FUNCTION__, __LINE__, 'init', 'RUN_HOURLY_RESET'); registerFilter(__FUNCTION__, __LINE__, 'init', 'RUN_DAILY_RESET'); registerFilter(__FUNCTION__, __LINE__, 'init', 'TRIGGER_SENDING_POOL'); - registerFilter(__FUNCTION__, __LINE__, 'init', 'DETERMINE_USERNAME'); + unregisterFilter(__FUNCTION__, __LINE__, 'init', 'DETERMINE_USERNAME', TRUE); registerFilter(__FUNCTION__, __LINE__, 'init', 'DETERMINE_WHAT_ACTION'); registerFilter(__FUNCTION__, __LINE__, 'init', 'COUNT_MODULE'); registerFilter(__FUNCTION__, __LINE__, 'init', 'UPDATE_LOGIN_DATA'); registerFilter(__FUNCTION__, __LINE__, 'init', 'ACTIVATE_EXCHANGE'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'REDIRECT_WRONG_SERVER_NAME'); + + // Post-initialization + registerFilter(__FUNCTION__, __LINE__, 'post_init', 'DETERMINE_USERNAME'); // Page headers - pre-filter (normally, you want to register here) registerFilter(__FUNCTION__, __LINE__, 'pre_page_header', 'LOAD_PAGE_HEADER'); @@ -202,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 @@ -259,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';