mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-04 03:40:53 +02:00
create different compiled templates and config files
Smarty does now automatically detect a change of the $merge_compiled_includes and $escape_html
property and create different compiled templates files depending on the setting.
Same applies to config files and the $config_overwrite, $config_booleanize and
$config_read_hidden properties.
This commit is contained in:
@@ -94,7 +94,13 @@ class Smarty_Template_Compiled
|
||||
public function populateCompiledFilepath(Smarty_Internal_Template $_template)
|
||||
{
|
||||
$_compile_id = isset($_template->compile_id) ? preg_replace('![^\w\|]+!', '_', $_template->compile_id) : null;
|
||||
$_filepath = $_template->source->uid;
|
||||
if ($_template->source->isConfig) {
|
||||
$_flag = '_' . ((int) $_template->smarty->config_read_hidden + (int) $_template->smarty->config_booleanize * 2
|
||||
+ (int) $_template->smarty->config_overwrite * 4);
|
||||
} else {
|
||||
$_flag = '_' . ((int) $_template->smarty->merge_compiled_includes + (int) $_template->smarty->escape_html * 2);
|
||||
}
|
||||
$_filepath = $_template->source->uid . $_flag;
|
||||
// if use_sub_dirs, break file into directories
|
||||
if ($_template->smarty->use_sub_dirs) {
|
||||
$_filepath = substr($_filepath, 0, 2) . DS
|
||||
|
||||
Reference in New Issue
Block a user