mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
- bugfix for custom delimiter at extends resource and {extends} tag
This commit is contained in:
@@ -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
|
||||
|
@@ -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'] =
|
||||
|
@@ -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'] =
|
||||
|
Reference in New Issue
Block a user