Index: branches/5.1.x/core/kernel/nparser/ntags.php =================================================================== diff -u -N -r13086 -r13168 --- branches/5.1.x/core/kernel/nparser/ntags.php (.../ntags.php) (revision 13086) +++ branches/5.1.x/core/kernel/nparser/ntags.php (.../ntags.php) (revision 13168) @@ -1,6 +1,6 @@ PostProcess(\${$tag['NP']['name']}, \$_p_->PreparePostProcess(\$_tag_params));"; $code[] = "}"; - + if (array_key_exists('result_to_var', $tag['NP']) && $tag['NP']['result_to_var']) { $code[] = "\$params['{$tag['NP']['result_to_var']}'] = \$_parser->GetParam('{$tag['NP']['result_to_var']}');"; - + if (array_key_exists('plus', $tag['NP'])) { $code[] = "\$params['{$tag['NP']['result_to_var']}'] += {$tag['NP']['plus']};"; } - + $code[] = "\${$tag['NP']['result_to_var']} = \$params['{$tag['NP']['result_to_var']}'];"; } elseif (array_key_exists('plus', $tag['NP'])) { @@ -573,16 +573,20 @@ function Open($tag) { - $pointer = abs(crc32($tag['file'])).'_'.$tag['line']; $o = ''; - $this->AppendCode($o, "if (!\$_parser->CacheStart('{$pointer}')) {\n"); + $pointer = abs(crc32($tag['file'])).'_'.$tag['line']; + $key = array_key_exists('key', $tag['NP']) ? $tag['NP']['key'] : ''; + $this->AppendCode($o, "if (!\$_parser->CacheStart('{$pointer}', \"{$key}\")) {\n"); + return $o; } function Close($tag) { $o = $this->Parser->Buffers[$this->Parser->Level]; - $this->AppendCode($o, "\$_parser->CacheEnd();\n}\n"); + $cache_timeout = array_key_exists('cache_timeout', $this->Tag['NP']) ? $this->Tag['NP']['cache_timeout'] : 0; + $this->AppendCode($o, "\$_parser->CacheEnd(" . (int)$cache_timeout . ");\n}\n"); + return $o; }