// 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}';
// 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);
// Compile it
//* DEBUG: */ debugOutput('<pre>'.linenumberCode($code).'</pre>');
$eval = '$newContent = "' . str_replace('{DQUOTE}', '"', compileCode(escapeQuotes($code), false, true, $enableCodes)) . '";';
- //* DEBUG: */ if (!$insertComments) print('<pre>'.linenumberCode($eval).'</pre>');
+ //* DEBUG: */ if (!$insertComments) print('EVAL=<pre>'.linenumberCode($eval).'</pre>');
eval($eval);
+ //* DEBUG: */ if (!$insertComments) print('NEW=<pre>'.linenumberCode($newContent).'</pre>');
//* DEBUG: */ die('<pre>'.encodeEntities($newContent).'</pre>');
// Was that eval okay?