From: Roland Häder Date: Fri, 6 Nov 2009 14:36:06 +0000 (+0000) Subject: Replace of simple quote (') fixed X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=655f1bea8cda9a62fda703428f8693d8c025ff50;p=mailer.git Replace of simple quote (') fixed --- diff --git a/inc/functions.php b/inc/functions.php index 36e2dca25c..c68f9cb293 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -334,9 +334,6 @@ function loadTemplate ($template, $return=false, $content=array()) { // The local file does exists so we load it. :) $GLOBALS['tpl_content'] = readFromFile($FQFN); - // Replace ' to our own chars to preventing them being quoted - while (strpos($GLOBALS['tpl_content'], "'") !== false) { $GLOBALS['tpl_content'] = str_replace("'", '{QUOT}', $GLOBALS['tpl_content']); } - // Do we have to compile the code? $ret = ''; if ((strpos($GLOBALS['tpl_content'], '$') !== false) || (strpos($GLOBALS['tpl_content'], '{--') !== false) || (strpos($GLOBALS['tpl_content'], '{!') !== false) || (strpos($GLOBALS['tpl_content'], '{?') !== false)) { @@ -1035,6 +1032,7 @@ function compileCode ($code, $simple = false, $constants = true, $full = true) { } // Compiles the code (use compileCode() only for HTML because of the comments) +// @TODO $simple is deprecated function compileRawCode ($code, $simple = false, $constants = true, $full = true) { // Is the code a string? if (!is_string($code)) { @@ -1068,9 +1066,6 @@ function compileRawCode ($code, $simple = false, $constants = true, $full = true $code = str_replace($to, $secChars['from'][$k], $code); } // END - foreach - // But shall I keep simple quotes for later use? - if ($simple) $code = str_replace("'", '{QUOT}', $code); - // Find $content[bla][blub] entries preg_match_all('/\$(content|GLOBALS|DATA)((\[([a-zA-Z0-9-_]+)\])*)/', $code, $matches);