]> git.mxchange.org Git - mailer.git/blobdiff - inc/wrapper-functions.php
Extension ext-cprping introduced (dummy), 'install' directory excluded from GNU GPL:
[mailer.git] / inc / wrapper-functions.php
index 1c3e2b60d1f61690bbc7f7a8ab7dda538c804c8a..308f7439a6b589421729f0fabed41f4b50deb8f0 100644 (file)
@@ -481,33 +481,6 @@ function copyFileVerified ($source, $dest, $chmod = '') {
        return $status;
 }
 
        return $status;
 }
 
-// Wrapper function for header()
-// Send a header but checks before if we can do so
-function sendHeader ($header) {
-       // Send the header
-       //* DEBUG: */ logDebugMessage(__FUNCTION__ . ': header=' . $header);
-       $GLOBALS['header'][] = trim($header);
-}
-
-// Flushes all headers
-function flushHeaders () {
-       // Is the header already sent?
-       if (headers_sent()) {
-               // Then abort here
-               debug_report_bug(__FUNCTION__, __LINE__, 'Headers already sent!');
-       } // END - if
-
-       // Flush all headers if found
-       if ((isset($GLOBALS['header'])) && (is_array($GLOBALS['header']))) {
-               foreach ($GLOBALS['header'] as $header) {
-                       header($header);
-               } // END - foreach
-       } // END - if
-
-       // Mark them as flushed
-       $GLOBALS['header'] = array();
-}
-
 // Wrapper function for chmod()
 // @TODO Do some more sanity check here
 function changeMode ($FQFN, $mode) {
 // Wrapper function for chmod()
 // @TODO Do some more sanity check here
 function changeMode ($FQFN, $mode) {
@@ -1148,10 +1121,10 @@ function sendRawRedirect ($url) {
                (preg_match('|^Microsoft-IIS/(\d)\.\d$|', trim($_SERVER['SERVER_SOFTWARE']), $matches)) &&
                ($matches[1] < 6)) {
                // Send the IIS header
                (preg_match('|^Microsoft-IIS/(\d)\.\d$|', trim($_SERVER['SERVER_SOFTWARE']), $matches)) &&
                ($matches[1] < 6)) {
                // Send the IIS header
-               sendHeader('Refresh: 0;url=' . $url);
+               addHttpHeader('Refresh: 0;url=' . $url);
        } else {
                // Send generic header
        } else {
                // Send generic header
-               sendHeader('Location: ' . $url);
+               addHttpHeader('Location: ' . $url);
        }
 
        // Shutdown here
        }
 
        // Shutdown here
@@ -2669,16 +2642,23 @@ function convertCommaToDotInPostDataArray ($postEntries) {
  * @link       http://de.php.net/manual/en/function.floatval.php#92563
  */
 function parseFloat ($floatString){
  * @link       http://de.php.net/manual/en/function.floatval.php#92563
  */
 function parseFloat ($floatString){
-    $LocaleInfo = localeconv();
-    $floatString = str_replace($LocaleInfo['mon_thousands_sep'] , '', $floatString);
-    $floatString = str_replace($LocaleInfo['mon_decimal_point'] , '.', $floatString);
-    return floatval($floatString);
+       // Load locale info
+       $LocaleInfo = localeconv();
+
+       // Remove thousand separators
+       $floatString = str_replace($LocaleInfo['mon_thousands_sep'] , '' , $floatString);
+
+       // Convert decimal point
+       $floatString = str_replace($LocaleInfo['mon_decimal_point'] , '.', $floatString);
+
+       // Return float value of converted string
+       return floatval($floatString);
 }
 
 // Generates a YES/NO option list from given default
 }
 
 // Generates a YES/NO option list from given default
-function generateYesNoOptionList ($configValue = '') {
+function generateYesNoOptionList ($defaultValue = '') {
        // Generate it
        // Generate it
-       return generateOptionList('/ARRAY/', array('Y', 'N'), array('{--YES--}', '{--NO--}'), $configValue);
+       return generateOptionList('/ARRAY/', array('Y', 'N'), array('{--YES--}', '{--NO--}'), $defaultValue);
 }
 
 // "Getter" for total available receivers
 }
 
 // "Getter" for total available receivers