X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fwrapper-functions.php;h=0c2c4425efa2beb4bc47669cf68636dd3a46396e;hb=2e394cb5b8a6225a39a6942b1fcc17c37a17a175;hp=11ef1ef287f346d112133131bcb33ed652ee1963;hpb=57df537144f8fbc3fd0ca239ab0076a891d06783;p=mailer.git diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 11ef1ef287..0c2c4425ef 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -1220,7 +1220,9 @@ function getYear ($timestamp = null) { // Is it cached? if (!isset($GLOBALS[__FUNCTION__][$timestamp])) { // null is time() - if (is_null($timestamp)) $timestamp = time(); + if (is_null($timestamp)) { + $timestamp = time(); + } // END - if // Then create it $GLOBALS[__FUNCTION__][$timestamp] = date('Y', $timestamp); @@ -2431,7 +2433,7 @@ function changeDataInInclude ($FQFN, $comment, $prefix, $suffix, $DATA, $seek=0) } // Wrapper for changing entries in config-local.php -function changeDataInInclude ($comment, $prefix, $suffix, $DATA, $seek = 0) { +function changeDataInLocalConfigurationFile ($comment, $prefix, $suffix, $DATA, $seek = 0) { // Call the inner function return changeDataInInclude(getCachePath() . 'config-local.php', $comment, $prefix, $suffix, $DATA, $seek); } @@ -2441,5 +2443,59 @@ function firstCharUpperCase ($str) { return ucfirst(strtolower($str)); } +// Shortens calls with configuration entry as first argument (the second will become obsolete in the future) +function createConfigurationTimeSelections ($configEntry, $stamps, $align = 'center') { + // Get the configuration entry + $configValue = getConfig($configEntry); + + // Call inner method + return createTimeSelections($configValue, $configEntry, $stamps, $align); +} + +// Shortens converting of German comma to Computer's version in POST data +function convertCommaToDotInPostData ($postEntry) { + // Read and convert given entry + $postValue = convertCommaToDot(postRequestParameter($postEntry)); + + // ... and set it again + setPostRequestParameter($postEntry, $postValue); +} + +// Converts German commas to Computer's version in all entries +function convertCommaToDotInPostDataArray (array $postEntries) { + // Replace german decimal comma with computer decimal dot + foreach ($postEntries as $entry) { + // Is the entry there? + if (isPostRequestParameterSet($entry)) { + // Then convert it + convertCommaToDotInPostData($entry); + } // END - if + } // END - foreach +} + +// Getter for 'check_double_email' +function getCheckDoubleEmail () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = getConfig('check_double_email'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + +// Checks wether 'check_double_email' is "YES" +function isCheckDoubleEmailEnabled () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = (getCheckDoubleEmail() == 'Y'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + // [EOF] ?>