From 655f1bea8cda9a62fda703428f8693d8c025ff50 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 6 Nov 2009 14:36:06 +0000 Subject: [PATCH] Replace of simple quote (') fixed --- inc/functions.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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); -- 2.30.2