]> git.mxchange.org Git - mailer.git/blobdiff - inc/template-functions.php
Minor cleanups/renaming
[mailer.git] / inc / template-functions.php
index 10e1240b1d6c25c9c4a29ada1be7d95a2a7e5fd7..29e3e092db01218a48b7830291dd3de344f83786 100644 (file)
@@ -429,6 +429,7 @@ function detectExtraTemplatePath ($template) {
 
 // Loads an email template and compiles it
 function loadEmailTemplate ($template, $content = array(), $userid = '0', $loadUserData = true) {
+       // @TODO $DATA is deprecated and should be avoided and replaced with $content
        global $DATA;
 
        // Make sure all template names are lowercase!
@@ -620,8 +621,8 @@ function compileRawCode ($code, $simple = false, $constants = true, $full = true
        $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
-       preg_match_all('/\$(content|GLOBALS|DATA)((\[([a-zA-Z0-9-_]+)\])*)/', $code, $matches);
+       // @TODO Do only use $content and deprecate $DATA in templates
+       preg_match_all('/\$(content|DATA)((\[([a-zA-Z0-9-_]+)\])*)/', $code, $matches);
 
        // Are some matches found?
        if ((count($matches) > 0) && (count($matches[0]) > 0)) {
@@ -647,7 +648,9 @@ function compileRawCode ($code, $simple = false, $constants = true, $full = true
                        } // END - foreach
 
                        // Skip this entry?
-                       if ($fuzzyFound === true) continue;
+                       if ($fuzzyFound === true) {
+                               continue;
+                       } // END - if
 
                        // Take all string elements
                        if ((is_string($matches[4][$key])) && (!isset($matchesFound[$match])) && (!isset($matchesFound[$key.'_' . $matches[4][$key]]))) {