mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
- bugfix extends resource did not work with user defined left/right delimiter https://github.com/smarty-php/smarty/issues/419
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== 3.1.32 - dev ===
|
===== 3.1.32 - dev ===
|
||||||
|
16.03.2018
|
||||||
|
- bugfix extends resource did not work with user defined left/right delimiter https://github.com/smarty-php/smarty/issues/419
|
||||||
|
|
||||||
22.11.2017
|
22.11.2017
|
||||||
- bugfix {break} and {continue} could fail if {foreach}{/foreach} did contain other
|
- bugfix {break} and {continue} could fail if {foreach}{/foreach} did contain other
|
||||||
looping tags like {for}, {section} and {while} https://github.com/smarty-php/smarty/issues/323
|
looping tags like {for}, {section} and {while} https://github.com/smarty-php/smarty/issues/323
|
||||||
|
@@ -112,7 +112,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
/**
|
/**
|
||||||
* smarty version
|
* smarty version
|
||||||
*/
|
*/
|
||||||
const SMARTY_VERSION = '3.1.32-dev-38';
|
const SMARTY_VERSION = '3.1.32-dev-39';
|
||||||
/**
|
/**
|
||||||
* define variable scopes
|
* define variable scopes
|
||||||
*/
|
*/
|
||||||
@@ -1270,6 +1270,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
* @param string $name property name
|
* @param string $name property name
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
|
* @throws \SmartyException
|
||||||
*/
|
*/
|
||||||
public function __get($name)
|
public function __get($name)
|
||||||
{
|
{
|
||||||
@@ -1293,6 +1294,8 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
*
|
*
|
||||||
* @param string $name property name
|
* @param string $name property name
|
||||||
* @param mixed $value parameter passed to setter
|
* @param mixed $value parameter passed to setter
|
||||||
|
*
|
||||||
|
* @throws \SmartyException
|
||||||
*/
|
*/
|
||||||
public function __set($name, $value)
|
public function __set($name, $value)
|
||||||
{
|
{
|
||||||
|
@@ -135,16 +135,17 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh
|
|||||||
/**
|
/**
|
||||||
* Create source code for {extends} from source components array
|
* Create source code for {extends} from source components array
|
||||||
*
|
*
|
||||||
* @param []\Smarty_Internal_Template_Source $components
|
* @param \Smarty_Internal_Template $template
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function extendsSourceArrayCode($components)
|
public static function extendsSourceArrayCode(Smarty_Internal_Template $template)
|
||||||
{
|
{
|
||||||
$resources = array();
|
$resources = array();
|
||||||
foreach ($components as $source) {
|
foreach ($template->source->components as $source) {
|
||||||
$resources[] = $source->resource;
|
$resources[] = $source->resource;
|
||||||
}
|
}
|
||||||
return '{extends file=\'extends:' . join('|', $resources) . '\' extends_resource=true}';
|
return $template->smarty->left_delimiter . 'extends file=\'extends:' . join('|', $resources) .
|
||||||
|
'\' extends_resource=true' . $template->smarty->right_delimiter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -394,7 +394,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
|||||||
// we have array of inheritance templates by extends: resource
|
// we have array of inheritance templates by extends: resource
|
||||||
// generate corresponding source code sequence
|
// generate corresponding source code sequence
|
||||||
$_content =
|
$_content =
|
||||||
Smarty_Internal_Compile_Extends::extendsSourceArrayCode($this->template->source->components);
|
Smarty_Internal_Compile_Extends::extendsSourceArrayCode($this->template);
|
||||||
} else {
|
} else {
|
||||||
// get template source
|
// get template source
|
||||||
$_content = $this->template->source->getContent();
|
$_content = $this->template->source->getContent();
|
||||||
|
Reference in New Issue
Block a user