$cnt = 0;
// Compile and run finished rendered HTML code
- while (((strpos($GLOBALS['output'], '{!') > 0) || (strpos($GLOBALS['output'], '{?') > 0)) && ($cnt < 3)) {
+ while (((strpos($GLOBALS['output'], '{--') > 0) || (strpos($GLOBALS['output'], '{!') > 0) || (strpos($GLOBALS['output'], '{?') > 0)) && ($cnt < 3)) {
// Prepare the content and eval() it...
$content = array();
$newContent = '';
$eval = '$ret = "' . compileCode(smartAddSlashes($GLOBALS['tpl_content'])) . '";';
}
} else {
- // Simply return loaded code
- $eval = '$ret = $GLOBALS[\'tpl_content\'];';
+ // Add surrounding HTML comments to help finding bugs faster
+ $ret = "<!-- Template " . $template . " - Start -->\n" . $GLOBALS['tpl_content'] . "<!-- Template " . $template . " - End -->\n";
+ $eval = '$ret = "' . smartAddSlashes($ret) . '";';
} // END - if
// Cache the eval() command here
// Don't de-refer our own links!
if (substr($URL, 0, strlen(getConfig('URL'))) != getConfig('URL')) {
// De-refer this link
- $URL = 'modules.php?module=loader&url=' . encodeString(compileUriCode($URL));
+ $URL = '{?URL?}/modules.php?module=loader&url=' . encodeString(compileUriCode($URL));
} // END - if
// Return link
// Does only allow numbers
function bigintval ($num, $castValue = true) {
// Filter all numbers out
- $ret = preg_replace("/[^0123456789]/", '', $num);
+ $ret = preg_replace('/[^0123456789]/', '', $num);
// Shall we cast?
if ($castValue) $ret = (double)$ret;
// Rebuild cache
if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
// Destroy it
- $GLOBALS['cache_instance']->removeCacheFile(false, $force);
+ $GLOBALS['cache_instance']->removeCacheFile($force);
} // END - if
// Include file given?