]> git.mxchange.org Git - mailer.git/blobdiff - inc/template-functions.php
Mailer project continued (heavy refactoring):
[mailer.git] / inc / template-functions.php
index 208c2f21267780c53be2bf487f72bd1284fe0847..dcf627628fd42a68acf14129737b5bb828a619cf 100644 (file)
@@ -112,7 +112,7 @@ function outputHtml ($htmlCode, $newLine = TRUE) {
 
                                        // That's why you don't need any \n at the end of your HTML code... :-)
                                        if ($newLine === TRUE) {
 
                                        // That's why you don't need any \n at the end of your HTML code... :-)
                                        if ($newLine === TRUE) {
-                                               outputRawCode(chr(10));
+                                               outputRawCode(PHP_EOL);
                                        } // END - if
                                } else {
                                        // Render mode for old or lame servers...
                                        } // END - if
                                } else {
                                        // Render mode for old or lame servers...
@@ -120,7 +120,7 @@ function outputHtml ($htmlCode, $newLine = TRUE) {
 
                                        // That's why you don't need any \n at the end of your HTML code... :-)
                                        if ($newLine === TRUE) {
 
                                        // That's why you don't need any \n at the end of your HTML code... :-)
                                        if ($newLine === TRUE) {
-                                               $GLOBALS['__output'] .= chr(10);
+                                               $GLOBALS['__output'] .= PHP_EOL;
                                        } // END - if
                                }
                                break;
                                        } // END - if
                                }
                                break;
@@ -135,7 +135,7 @@ function outputHtml ($htmlCode, $newLine = TRUE) {
                                // The same as above... ^
                                outputRawCode($htmlCode);
                                if ($newLine === TRUE) {
                                // The same as above... ^
                                outputRawCode($htmlCode);
                                if ($newLine === TRUE) {
-                                       outputRawCode(chr(10));
+                                       outputRawCode(PHP_EOL);
                                } // END - if
                                break;
 
                                } // END - if
                                break;
 
@@ -1501,7 +1501,7 @@ function linenumberCode ($code)    {
 
        if (!is_array($code)) {
                // We need an array, so try it with the new-line character
 
        if (!is_array($code)) {
                // We need an array, so try it with the new-line character
-               $codeE = explode(chr(10), $code);
+               $codeE = explode(PHP_EOL, $code);
        } // END - if
 
        $count_lines = count($codeE);
        } // END - if
 
        $count_lines = count($codeE);
@@ -1702,16 +1702,16 @@ function sendModeMails ($mod, $modes) {
                                                switch ($mode) {
                                                        case 'normal': break; // Do not add any special lines
                                                        case 'email': // Email was changed!
                                                switch ($mode) {
                                                        case 'normal': break; // Do not add any special lines
                                                        case 'email': // Email was changed!
-                                                               $content['message'] = '{--MEMBER_CHANGED_EMAIL--}' . ': ' . postRequestElement('old_email') . chr(10);
+                                                               $content['message'] = '{--MEMBER_CHANGED_EMAIL--}' . ': ' . postRequestElement('old_email') . PHP_EOL;
                                                                break;
 
                                                        case 'password': // Password was changed
                                                                break;
 
                                                        case 'password': // Password was changed
-                                                               $content['message'] = '{--MEMBER_CHANGED_PASS--}' . chr(10);
+                                                               $content['message'] = '{--MEMBER_CHANGED_PASS--}' . PHP_EOL;
                                                                break;
 
                                                        default:
                                                                logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown mode %s detected.", $mode));
                                                                break;
 
                                                        default:
                                                                logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown mode %s detected.", $mode));
-                                                               $content['message'] = '{--MEMBER_UNKNOWN_MODE--}' . ': ' . $mode . "\n\n";
+                                                               $content['message'] = '{--MEMBER_UNKNOWN_MODE--}' . ': ' . $mode . PHP_EOL . PHP_EOL;
                                                                break;
                                                } // END - switch
                                        } // END - foreach
                                                                break;
                                                } // END - switch
                                        } // END - foreach
@@ -2295,7 +2295,7 @@ function anonymizeSensitiveData ($data) {
  */
 function compactContent ($uncompactedContent) {
        // First, remove all tab/new-line/revert characters
  */
 function compactContent ($uncompactedContent) {
        // First, remove all tab/new-line/revert characters
-       $compactedContent = str_replace(chr(9), '', str_replace(chr(10), '', str_replace(chr(13), '', $uncompactedContent)));
+       $compactedContent = str_replace(chr(9), '', str_replace(PHP_EOL, '', str_replace(chr(13), '', $uncompactedContent)));
 
        // Then regex all comments like <!-- //--> away
        preg_match_all('/<!--[\w\W]*?(\/\/){0,1}-->/', $compactedContent, $matches);
 
        // Then regex all comments like <!-- //--> away
        preg_match_all('/<!--[\w\W]*?(\/\/){0,1}-->/', $compactedContent, $matches);