Replace of simple quote (') fixed
authorRoland Häder <roland@mxchange.org>
Fri, 6 Nov 2009 14:36:06 +0000 (14:36 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 6 Nov 2009 14:36:06 +0000 (14:36 +0000)
inc/functions.php

index 36e2dca25ca518a4fcf45afa9576a04c34c60dad..c68f9cb293ddd99be3a2435097d0a82d347cd4a4 100644 (file)
@@ -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);
 
                        // 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)) {
                        // 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)
 }
 
 // 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)) {
 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
 
                $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);
 
        // Find $content[bla][blub] entries
        preg_match_all('/\$(content|GLOBALS|DATA)((\[([a-zA-Z0-9-_]+)\])*)/', $code, $matches);