del debog line

This commit is contained in:
Gnieark 2018-03-19 21:08:01 +01:00
parent c5ceda9734
commit e705cfceb9

View File

@ -72,8 +72,7 @@ class TplBlock {
$str); $str);
} }
//Isolate blocs //parse blocs
foreach($this->subBlocs as $blocName => $blocsArr){ foreach($this->subBlocs as $blocName => $blocsArr){
$str = preg_replace_callback( $str = preg_replace_callback(
'/' . self::blockStartStart . preg_quote($prefix . $blocName) . self::blockStartEnd . '/' . self::blockStartStart . preg_quote($prefix . $blocName) . self::blockStartEnd .
@ -81,9 +80,9 @@ class TplBlock {
self::blockEndStart . preg_quote($prefix . $blocName). self::blockEndEnd. self::blockEndStart . preg_quote($prefix . $blocName). self::blockEndEnd.
'/is', '/is',
function($m) use($blocName,$blocsArr,$prefix, $trim) { function($m) use($blocName,$blocsArr,$prefix, $trim) {
echo gettype($trim).$trim;
$out = ""; $out = "";
foreach($blocsArr as $bloc){ foreach($blocsArr as $bloc){
//recursion
$out.=$bloc->apply_tpl_str( $m[1] , $prefix . $blocName , $trim ); $out.=$bloc->apply_tpl_str( $m[1] , $prefix . $blocName , $trim );
} }
return $out; return $out;
@ -92,6 +91,9 @@ class TplBlock {
); );
} }
//delete unused blocs
//to do
if($trim){ if($trim){
return trim($str,"\n"); return trim($str,"\n");
}else{ }else{