X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fwrapper-functions.php;h=7c721976e4202171f72af01ec5f3b3b2c746108f;hp=3622206589027c3680d34c714c2dfaacb03bbf3a;hb=96144a19af504a59b07ff39d378e7da1f6fcf240;hpb=a6f31d458bf99f570e5c5efe7ea5f072eb2ae41b diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 3622206589..7c721976e4 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -511,7 +511,7 @@ function setAction ($newAction) { // Checks wether action is set and optionally aborts on miss function isActionSet ($abortOnMiss = false) { // Check for it - $isset = (!empty($GLOBALS['action'])); + $isset = (isset($GLOBALS['action'])); // Should we abort here? if (($abortOnMiss === true) && ($isset === false)) { @@ -593,5 +593,22 @@ function isOutputModeSet ($abortOnMiss = false) { return $isset; } +// Enables block-mode +function enableBlockMode ($enabled = true) { + $GLOBALS['block_mode'] = $enabled; +} + +// Checks wether block-mode is enabled +function isBlockModeEnabled () { + // Abort if not set + if (!isset($GLOBALS['block_mode'])) { + // Needs to be fixed + debug_report_bug(__FUNCTION__ . ': block_mode is not set.'); + } // END - if + + // Return it + return $GLOBALS['block_mode']; +} + // [EOF] ?>