From: quix0r Date: Mon, 9 Aug 2010 04:19:37 +0000 (+0000) Subject: Fix for broken emails... :( X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=96507781e56422b755f14287fde1f52c96d1c660;p=mailer.git Fix for broken emails... :( --- diff --git a/inc/expression-functions.php b/inc/expression-functions.php index b1a31c4a0f..c8129ddb21 100644 --- a/inc/expression-functions.php +++ b/inc/expression-functions.php @@ -168,7 +168,7 @@ function doExpressionConfig ($data) { // Do we have a special expression function for it? if (isExpressionFunctionAvaiable($data)) { // Then use it - $replacer = '{DQUOTE} . ' . $data['callback'] . '('.getExpressionFunction($data).'(' . "'" . $data['matches'][4][$data['key']] . "'" . ')) . {DQUOTE}'; + $replacer = '{DQUOTE} . ' . $data['callback'] . '(' . getExpressionFunction($data) . '()) . {DQUOTE}'; } else { // Default replacer is the config value itself $replacer = '{DQUOTE} . ' . $data['callback'] . '(getConfig(' . "'" . $data['matches'][4][$data['key']] . "'" . ')) . {DQUOTE}'; diff --git a/inc/functions.php b/inc/functions.php index 00cfe3b84c..9f3bf52436 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -181,12 +181,12 @@ function checkPhpMailerUsage() { // Send out a raw email with PHPMailer class or legacy mail() command function sendRawEmail ($toEmail, $subject, $message, $headers) { // Just compile all to put out all configs, etc. - $eval = '$toEmail = decodeEntities("' . doFinalCompilation(compileRawCode(escapeQuotes($toEmail)), false) . '"); '; - $eval .= '$subject = decodeEntities("' . doFinalCompilation(compileRawCode(escapeQuotes($subject)), false) . '"); '; - $eval .= '$headers = decodeEntities("' . doFinalCompilation(compileRawCode(escapeQuotes($headers)), false) . '"); '; + $eval = '$toEmail = decodeEntities("' . escapeQuotes(doFinalCompilation(compileRawCode($toEmail), false)) . '"); '; + $eval .= '$subject = decodeEntities("' . escapeQuotes(doFinalCompilation(compileRawCode($subject), false)) . '"); '; + $eval .= '$headers = decodeEntities("' . escapeQuotes(doFinalCompilation(compileRawCode($headers), false)) . '"); '; // Do not decode entities in the message because we also send HTML mails through this function - $eval .= '$message = "' . doFinalCompilation(compileRawCode(escapeQuotes($message)), false) . '";'; + $eval .= '$message = "' . escapeQuotes(doFinalCompilation(compileRawCode($message), false)) . '";'; // Run the final eval() command eval($eval); diff --git a/inc/template-functions.php b/inc/template-functions.php index 4086492753..65e73d005a 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -226,8 +226,9 @@ function doFinalCompilation ($code, $insertComments = true, $enableCodes = true) // Compile it //* DEBUG: */ debugOutput('
'.linenumberCode($code).'
'); $eval = '$newContent = "' . str_replace('{DQUOTE}', '"', compileCode(escapeQuotes($code), false, true, $enableCodes)) . '";'; - //* DEBUG: */ if (!$insertComments) print('
'.linenumberCode($eval).'
'); + //* DEBUG: */ if (!$insertComments) print('EVAL=
'.linenumberCode($eval).'
'); eval($eval); + //* DEBUG: */ if (!$insertComments) print('NEW=
'.linenumberCode($newContent).'
'); //* DEBUG: */ die('
'.encodeEntities($newContent).'
'); // Was that eval okay?