]> git.mxchange.org Git - mailer.git/blobdiff - inc/template-functions.php
Missing bonus mode 'ADD' added
[mailer.git] / inc / template-functions.php
index b675c6b6dc522617cd22de76010508efe72eed31..f5f1c25965d5967179d1a5ed82c0a2dc355914dc 100644 (file)
@@ -74,7 +74,9 @@ function fixEmptyContentToDashes ($str) {
        $str = trim($str);
 
        // Is the string empty?
-       if (empty($str)) $str = '---';
+       if (empty($str)) {
+               $str = '---';
+       } // END - if
 
        // Return string
        return $str;
@@ -279,7 +281,7 @@ function loadTemplate ($template, $return = false, $content = array()) {
 
                // Base directory
                $basePath = sprintf("%stemplates/%s/html/", getPath(), getLanguage());
-               $extraPath = detectExtraTemplatePath($template);;
+               $extraPath = detectExtraTemplatePath($template);
 
                // Generate FQFN
                $FQFN = $basePath . $extraPath . $template . '.tpl';
@@ -594,10 +596,7 @@ function compileRawCode ($code, $simple = false, $constants = true, $full = true
        $code = str_replace('{--', '{%message,', str_replace('--}', '%}', $code));
 
        // Compile QUOT and other non-HTML codes
-       foreach ($secChars['to'] as $k => $to) {
-               // Do the reversed thing as in inc/libs/security_functions.php
-               $code = str_replace($to, $secChars['from'][$k], $code);
-       } // END - foreach
+       $code = str_replace($secChars['to'], $secChars['from'], $code);
 
        // Find $content[bla][blub] entries
        // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates
@@ -1312,7 +1311,7 @@ function linenumberCode ($code)    {
        $count_lines = count($codeE);
 
        $r = 'Line | Code:<br />';
-       foreach($codeE as $line => $c) {
+       foreach ($codeE as $line => $c) {
                $r .= '<div class="line"><span class="linenum">';
                if ($count_lines == 1) {
                        $r .= 1;