mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-09 12:54:26 +02:00
- bugfix on nocache code in {block} tags if child template was included by {include}
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
01/03/2010
|
||||||
|
- bugfix on nocache code in {block} tags if child template was included by {include}
|
||||||
|
|
||||||
27/02/2010
|
27/02/2010
|
||||||
- allow block tags inside double quoted string
|
- allow block tags inside double quoted string
|
||||||
|
|
||||||
|
@@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Smarty Internal Plugin Compile Block
|
* Smarty Internal Plugin Compile Block
|
||||||
*
|
*
|
||||||
* Compiles the {block}{/block} tags
|
* Compiles the {block}{/block} tags
|
||||||
*
|
*
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
* @subpackage Compiler
|
* @subpackage Compiler
|
||||||
* @author Uwe Tews
|
* @author Uwe Tews
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Smarty Internal Plugin Compile Block Class
|
* Smarty Internal Plugin Compile Block Class
|
||||||
*/
|
*/
|
||||||
class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {
|
class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {
|
||||||
/**
|
/**
|
||||||
* Compiles code for the {block} tag
|
* Compiles code for the {block} tag
|
||||||
@@ -23,7 +23,7 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {
|
|||||||
{
|
{
|
||||||
$this->compiler = $compiler;
|
$this->compiler = $compiler;
|
||||||
$this->required_attributes = array('name');
|
$this->required_attributes = array('name');
|
||||||
$this->optional_attributes = array('assign','nocache');
|
$this->optional_attributes = array('assign', 'nocache');
|
||||||
// check and get attributes
|
// check and get attributes
|
||||||
$_attr = $this->_get_attributes($args);
|
$_attr = $this->_get_attributes($args);
|
||||||
$save = array($_attr, $compiler->template->extracted_compiled_code, $compiler->template->extract_code, $this->compiler->nocache);
|
$save = array($_attr, $compiler->template->extracted_compiled_code, $compiler->template->extract_code, $this->compiler->nocache);
|
||||||
@@ -42,8 +42,8 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Smarty Internal Plugin Compile BlockClose Class
|
* Smarty Internal Plugin Compile BlockClose Class
|
||||||
*/
|
*/
|
||||||
class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_CompileBase {
|
class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_CompileBase {
|
||||||
/**
|
/**
|
||||||
* Compiles code for the {/block} tag
|
* Compiles code for the {/block} tag
|
||||||
@@ -90,6 +90,9 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_CompileBase {
|
|||||||
}
|
}
|
||||||
$compiler->template->properties['file_dependency'] = array_merge($compiler->template->properties['file_dependency'], $_tpl->properties['file_dependency']);
|
$compiler->template->properties['file_dependency'] = array_merge($compiler->template->properties['file_dependency'], $_tpl->properties['file_dependency']);
|
||||||
$compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $_tpl->properties['function']);
|
$compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $_tpl->properties['function']);
|
||||||
|
if ($_tpl->has_nocache_code) {
|
||||||
|
$compiler->template->has_nocache_code = true;
|
||||||
|
}
|
||||||
foreach($_tpl->required_plugins as $code => $tmp1) {
|
foreach($_tpl->required_plugins as $code => $tmp1) {
|
||||||
foreach($tmp1 as $name => $tmp) {
|
foreach($tmp1 as $name => $tmp) {
|
||||||
foreach($tmp as $type => $data) {
|
foreach($tmp as $type => $data) {
|
||||||
|
Reference in New Issue
Block a user