X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fwrapper-functions.php;h=02c2e4c09d8cc0f5db17252273b83f3ce15d3586;hb=3b7adf43576db24e516716bb13a2bd0bac677c8c;hp=ffd748ab413feec03d9b2724367adb74e0c392ae;hpb=0a24783dc45dbe60c5c927f9c11c52eb8968d06f;p=mailer.git diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index ffd748ab41..02c2e4c09d 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); @@ -2441,5 +2443,35 @@ 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 +} + // [EOF] ?>