Index: trunk/core/kernel/parser/construct_tags.php =================================================================== diff -u -r3310 -r3530 --- trunk/core/kernel/parser/construct_tags.php (.../construct_tags.php) (revision 3310) +++ trunk/core/kernel/parser/construct_tags.php (.../construct_tags.php) (revision 3530) @@ -202,7 +202,7 @@ if (defined('EXPERIMENTAL_PRE_PARSE')) { $code = $this->Parser->GetCode(); array_unshift($code, '$o = \'\';'); - array_unshift($code, '$application->Parser->Params = $params;'); + array_unshift($code, '$application->Parser->SetParams($params);'); array_unshift($code, '$application =& kApplication::Instance();'); array_unshift($code, 'extract($params);'); Index: trunk/core/kernel/parser/template_parser.php =================================================================== diff -u -r3372 -r3530 --- trunk/core/kernel/parser/template_parser.php (.../template_parser.php) (revision 3372) +++ trunk/core/kernel/parser/template_parser.php (.../template_parser.php) (revision 3530) @@ -64,7 +64,10 @@ function SetParams($params) { if (!is_array($params)) $params = Array(); + $this->Params = $params; + $this->ParamsStack[$this->ParamsRecursionIndex] = $params; + foreach ($params as $key => $val) { $this->AddParam('/[{]{0,1}\$'.$key.'[}]{0,1}/i', $val, 1); //Do not sort every time } @@ -371,7 +374,7 @@ } } else { - if (file_exists($fname) && filemtime($fname) > filemtime($tname)) { + if (file_exists($fname) && file_exists($tname) && filemtime($fname) > filemtime($tname)) { include($fname); $is_cached = true; } Index: trunk/core/kernel/parser/template.php =================================================================== diff -u -r3344 -r3530 --- trunk/core/kernel/parser/template.php (.../template.php) (revision 3344) +++ trunk/core/kernel/parser/template.php (.../template.php) (revision 3530) @@ -169,7 +169,7 @@ function GetTemplateFileName($title) { - return $this->FileNames[$title]; + return getArrayValue($this->FileNames, $title); } function SetTemplateBody($title, $body)