mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
load source resource at template object creation
This commit is contained in:
@@ -109,9 +109,6 @@ class Smarty_Template_Cached
|
||||
{
|
||||
$this->compile_id = $_template->compile_id;
|
||||
$this->cache_id = $_template->cache_id;
|
||||
if (!isset($_template->source)) {
|
||||
$_template->loadSource();
|
||||
}
|
||||
$this->source = $_template->source;
|
||||
if (!class_exists('Smarty_CacheResource', false)) {
|
||||
require SMARTY_SYSPLUGINS_DIR . 'smarty_cacheresource.php';
|
||||
@@ -393,7 +390,6 @@ class Smarty_Template_Cached
|
||||
$_SERVER['SMARTY_PHPUNIT_HEADERS'][] = 'Last-Modified: ' . gmdate('D, d M Y H:i:s', $this->timestamp) . ' GMT';
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $this->timestamp) . ' GMT');
|
||||
break;
|
||||
|
@@ -109,7 +109,7 @@ class Smarty_Template_Config extends Smarty_Template_Source
|
||||
$resource = Smarty_Resource::load($smarty, $type);
|
||||
$source = new Smarty_Template_Config($resource, $smarty, $template_resource, $type, $name);
|
||||
$resource->populate($source, $_template);
|
||||
if ((!isset($source->exists) || !$source->exists) && isset($_template->smarty->default_config_handler_func)) {
|
||||
if (!$source->exists && isset($_template->smarty->default_config_handler_func)) {
|
||||
Smarty_Internal_Extension_DefaultTemplateHandler::_getDefault($_template, $source);
|
||||
}
|
||||
$source->unique_resource = $resource->buildUniqueResourceName($smarty, $name, true);
|
||||
|
Reference in New Issue
Block a user