mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
- bugfix the source uid of the extendsall resource must contain $template_dir settings https://github.com/smarty-php/smarty/issues/123
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
- bugfix failure when the default resource type was set to 'extendsall' https://github.com/smarty-php/smarty/issues/123
|
- bugfix failure when the default resource type was set to 'extendsall' https://github.com/smarty-php/smarty/issues/123
|
||||||
- update compilation of Smarty special variables
|
- update compilation of Smarty special variables
|
||||||
- bugfix add addition check for OS type on normalizaition of file path https://github.com/smarty-php/smarty/issues/134
|
- bugfix add addition check for OS type on normalizaition of file path https://github.com/smarty-php/smarty/issues/134
|
||||||
|
- bugfix the source uid of the extendsall resource must contain $template_dir settings https://github.com/smarty-php/smarty/issues/123
|
||||||
|
|
||||||
19.12.2015
|
19.12.2015
|
||||||
- bugfix using $smarty.capture.foo in expressions could fail https://github.com/smarty-php/smarty/pull/138
|
- bugfix using $smarty.capture.foo in expressions could fail https://github.com/smarty-php/smarty/pull/138
|
||||||
|
@@ -23,13 +23,13 @@ class Smarty_Resource_Extendsall extends Smarty_Internal_Resource_Extends
|
|||||||
$uid = '';
|
$uid = '';
|
||||||
$sources = array();
|
$sources = array();
|
||||||
$exists = true;
|
$exists = true;
|
||||||
foreach ($source->smarty->getTemplateDir() as $key => $directory) {
|
foreach ($_template->smarty->getTemplateDir() as $key => $directory) {
|
||||||
try {
|
try {
|
||||||
$s = Smarty_Template_Source::load(null, $source->smarty, 'file:[' . $key . ']' . $source->name);
|
$s = Smarty_Resource::source(null, $source->smarty, 'file:' . '[' . $key . ']' . $source->name);
|
||||||
if (!$s->exists) {
|
if (!$s->exists) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$sources[$s->uid] = $s;
|
$sources[ $s->uid ] = $s;
|
||||||
$uid .= $s->filepath;
|
$uid .= $s->filepath;
|
||||||
}
|
}
|
||||||
catch (SmartyException $e) {
|
catch (SmartyException $e) {
|
||||||
@@ -38,7 +38,9 @@ class Smarty_Resource_Extendsall extends Smarty_Internal_Resource_Extends
|
|||||||
|
|
||||||
if (!$sources) {
|
if (!$sources) {
|
||||||
$source->exists = false;
|
$source->exists = false;
|
||||||
return;
|
$source->template = $_template;
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sources = array_reverse($sources, true);
|
$sources = array_reverse($sources, true);
|
||||||
@@ -47,10 +49,12 @@ class Smarty_Resource_Extendsall extends Smarty_Internal_Resource_Extends
|
|||||||
|
|
||||||
$source->components = $sources;
|
$source->components = $sources;
|
||||||
$source->filepath = $s->filepath;
|
$source->filepath = $s->filepath;
|
||||||
$source->uid = sha1($uid);
|
$source->uid = sha1($uid . $_template->smarty->_joined_template_dir);
|
||||||
$source->exists = $exists;
|
$source->exists = $exists;
|
||||||
if ($_template && $_template->smarty->compile_check) {
|
if ($_template && $_template->smarty->compile_check) {
|
||||||
$source->timestamp = $s->getTimeStamp();
|
$source->timestamp = $s->timestamp;
|
||||||
}
|
}
|
||||||
|
// need the template at getContent()
|
||||||
|
$source->template = $_template;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -118,7 +118,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
/**
|
/**
|
||||||
* smarty version
|
* smarty version
|
||||||
*/
|
*/
|
||||||
const SMARTY_VERSION = '3.1.29-dev/16';
|
const SMARTY_VERSION = '3.1.29-dev/17';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* define variable scopes
|
* define variable scopes
|
||||||
|
Reference in New Issue
Block a user