// 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)) {
}
// 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)) {
$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);