]> git.mxchange.org Git - mailer.git/commitdiff
Asserts + TODO added
authorRoland Häder <roland@mxchange.org>
Wed, 31 Jul 2013 02:00:50 +0000 (02:00 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 31 Jul 2013 02:00:50 +0000 (02:00 +0000)
DOCS/TODOs.txt
inc/filter-functions.php

index e261a7a3bfc41252293e2a0799a608052e4e0261..8872529a551f8d22d7ae60a880079325ea4f2860 100644 (file)
 ./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.
index dc97d8ec41393402a6c01c6688394ea1b9273ef4..f60544c24efde8321a941cc8ce1882d97d75a557 100644 (file)
@@ -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;
 }