X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ftemplate-functions.php;h=d29104fd9517c65f6927ae6d1f5d079f75307a5c;hp=ac94882546bef37c686c798d7851fedf0c609dc8;hb=97702d59eb179b54690f9ccc18df66cd981ab0df;hpb=19fc9f2c0cdd76900c082e525a43a4a5decb1a56 diff --git a/inc/template-functions.php b/inc/template-functions.php index ac94882546..d29104fd95 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -433,9 +433,6 @@ function detectExtraTemplatePath ($template) { // Loads an email template and compiles it function loadEmailTemplate ($template, $content = array(), $userid = NULL, $loadUserData = true) { - // @TODO $DATA is deprecated and should be avoided and replaced with $content - global $DATA; - // Make sure all template names are lowercase! $template = strtolower($template); @@ -516,8 +513,6 @@ function loadEmailTemplate ($template, $content = array(), $userid = NULL, $load
{--TEMPLATE_CONTENT--}:
' . print_r($content, true) . '
- {--TEMPLATE_DATA--}: -
' . print_r($DATA, true) . '
'; // Debug mode not active? Then remove the HTML tags @@ -541,7 +536,6 @@ function loadEmailTemplate ($template, $content = array(), $userid = NULL, $load // Remove content and data unset($content); - unset($DATA); // Return content return $newContent; @@ -598,7 +592,7 @@ function compileCode ($code, $simple = false, $constants = true, $full = true, $ return $code; } -// Compiles the code (use compileCode() only for HTML because of the comments) +// Compiles the code // @TODO $simple/$constants are deprecated function compileRawCode ($code, $simple = false, $constants = true, $full = true, $compileCode = true) { // Is the code a string or shall we not compile? @@ -625,8 +619,7 @@ 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 $DATA in templates - preg_match_all('/\$(content|DATA)((\[([a-zA-Z0-9-_]+)\])*)/', $code, $matches); + preg_match_all('/\$content((\[([a-zA-Z0-9-_]+)\])*)/', $code, $matches); // Are some matches found? if ((count($matches) > 0) && (count($matches[0]) > 0)) { @@ -1259,6 +1252,7 @@ function compileUriCode ($code, $simple = true) { // Handle message codes from URL function handleCodeMessage () { + // Is 'code' set? if (isGetRequestParameterSet('code')) { // Default extension is 'unknown' $ext = 'unknown';