Index: trunk/core/kernel/parser/template_parser.php =================================================================== diff -u -N -r7635 -r8358 --- trunk/core/kernel/parser/template_parser.php (.../template_parser.php) (revision 7635) +++ trunk/core/kernel/parser/template_parser.php (.../template_parser.php) (revision 8358) @@ -27,6 +27,8 @@ var $DataExists = false; + var $FromPreParseCache = false; + function TemplateParser() { parent::kBase(); @@ -105,6 +107,7 @@ { $this->Params[strtolower($name)] = $value; $this->AddParam('/[{]{0,1}\$'.$name.'[}]{0,1}/i', $value, $this->FromPreParseCache); + $this->ParamsStack[$this->ParamsRecursionIndex][$name] = $value; } function SetBuffer($body) @@ -639,7 +642,11 @@ if( !isset($pass_params['PrefixSpecial']) && isset($pass_params['prefix']) ) $pass_params['PrefixSpecial'] = $pass_params['prefix']; $ret = $f($pass_params); - + + if (isset($params['return_params']) && $params['return_params']) { + $this->ParamsStack[$this->ParamsRecursionIndex - 1] = array_merge($this->ParamsStack[$this->ParamsRecursionIndex - 1], $this->ParamsStack[$this->ParamsRecursionIndex]); + } + unset($this->ParamsStack[$this->ParamsRecursionIndex--]); $this->Params = $this->ParamsStack[$this->ParamsRecursionIndex]; $this->MainParser = true; @@ -674,8 +681,10 @@ $template_name ); } + $this->Application->Parser =& $this; $this->Application->Parser->DataExists = $this->Application->Parser->DataExists || $BlockParser->DataExists; + return $o; }