X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ftemplate-functions.php;h=29e3e092db01218a48b7830291dd3de344f83786;hp=10e1240b1d6c25c9c4a29ada1be7d95a2a7e5fd7;hb=e1cf98e08d4d92edf492396b82c67efa97a0ece8;hpb=af7e2ca186ae88d343f90bcb753645ab4847f227 diff --git a/inc/template-functions.php b/inc/template-functions.php index 10e1240b1d..29e3e092db 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -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]]))) {