From: Roland Häder Date: Wed, 31 Jul 2013 02:00:50 +0000 (+0000) Subject: Asserts + TODO added X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=10e3416034d830eccbd19feb2a32853da941e224;p=mailer.git Asserts + TODO added --- diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index e261a7a3bf..8872529a55 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -89,15 +89,17 @@ ./inc/filter/bonus_filter.php:56: // @TODO This query isn't right, it will only update if the user was for a longer time away! ./inc/filter/forced_filter.php:75: // @TODO This part is unfinished ./inc/filter-functions.php:120: // @TODO Remove this forced removal after a year or so +./inc/filter-functions.php:438:// @TODO Add a filter chain here? E.g.: 'filter_chain_interrupted' +./inc/filter-functions.php:448:// @TODO Add a filter chain here? E.g.: 'filter_chain_continued' ./inc/filter/order_filter.php:132: // @TODO 200 is hard-coded here, swap it out to config + admin_config_order.tpl ./inc/filters.php:1394: // @TODO No banner found, output some default banner ./inc/filter/user_filter.php:279:// @TODO 0% done ./inc/filter/user_filter.php:289:// @TODO 0% done -./inc/filter/wernis_filter.php:113:// @TODO 0% done -./inc/filter/wernis_filter.php:123:// @TODO 0% done -./inc/filter/wernis_filter.php:59:// @TODO 10% done -./inc/filter/wernis_filter.php:74:// @TODO 10% done -./inc/filter/wernis_filter.php:89:// @TODO 10% done +./inc/filter/wernis_filter.php:125:// @TODO 0% done +./inc/filter/wernis_filter.php:135:// @TODO 0% done +./inc/filter/wernis_filter.php:62:// @TODO 10% done +./inc/filter/wernis_filter.php:80:// @TODO 10% done +./inc/filter/wernis_filter.php:98:// @TODO 10% done ./inc/functions.php:1216: // @TODO Are these convertions still required? ./inc/functions.php:1237:// @TODO Rewrite this function to use readFromFile() and writeToFile() ./inc/functions.php:1541: // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal. diff --git a/inc/filter-functions.php b/inc/filter-functions.php index dc97d8ec41..f60544c24e 100644 --- a/inc/filter-functions.php +++ b/inc/filter-functions.php @@ -435,13 +435,21 @@ function isFilterChainAborted () { } // Interrupts the filter chain by enabling flag 'filter_chain_aborted' +// @TODO Add a filter chain here? E.g.: 'filter_chain_interrupted' function interruptFilterChain () { + // Make sure that interrupted filter chains are not interrupted twice + assert((!isset($GLOBALS['filter_chain_interrupted'])) || ($GLOBALS['filter_chain_interrupted'] === FALSE)); + // Set it $GLOBALS['filter_chain_interrupted'] = TRUE; } // Continues the filter chain by disabling flag 'filter_chain_aborted' +// @TODO Add a filter chain here? E.g.: 'filter_chain_continued' function continueFilterChain () { + // Make sure that continued filter chains are not continued twice + assert((!isset($GLOBALS['filter_chain_interrupted'])) || ($GLOBALS['filter_chain_interrupted'] === TRUE)); + // Set it $GLOBALS['filter_chain_interrupted'] = FALSE; }