- bugfix for custom delimiter at extends resource and {extends} tag

This commit is contained in:
Uwe.Tews
2010-01-06 17:31:59 +00:00
parent 57fd94ddb1
commit ceb4cb75c7
3 changed files with 5 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
01/06/2009
- fixed typo in smarty_internal_resource_registered
- bugfix for custom delimiter at extends resource and {extends} tag
01/05/2009
- bugfix sha1() calculations at extends resource and some general improvments on sha1() handling

View File

@@ -53,10 +53,10 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase {
protected function saveBlockData($block_content, $block_tag, $template)
{
if (0 == preg_match('/(.?)(name=)([^ ]*)/', $block_tag, $_match)) {
if (0 == preg_match("/(.?)(name=)(.*?)(?=(\s|{$this->smarty->right_delimiter}))/", $block_tag, $_match)) {
$this->compiler->trigger_template_error("\"" . $block_tag . "\" missing name attribute");
} else {
$_name = trim($_match[3], "\"'}");
$_name = trim($_match[3], "\"'");
if (isset($this->smarty->block_data[$_name])) {
if (strpos($this->smarty->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) {
$this->smarty->block_data[$_name]['source'] =

View File

@@ -115,10 +115,10 @@ class Smarty_Internal_Resource_Extends {
}
protected function saveBlockData($block_content, $block_tag, $_filepath)
{
if (0 == preg_match('/(.?)(name=)([^ ]*)/', $block_tag, $_match)) {
if (0 == preg_match("/(.?)(name=)(.*?)(?=(\s|{$this->smarty->right_delimiter}))/", $block_tag, $_match)) {
$this->smarty->trigger_error("\"" . $block_tag . "\" missing name attribute");
} else {
$_name = trim($_match[3], "\"'}");
$_name = trim($_match[3], "\"'");
if (isset($this->smarty->block_data[$_name])) {
if (strpos($this->smarty->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) {
$this->smarty->block_data[$_name]['source'] =