mirror of
https://github.com/smarty-php/smarty.git
synced 2026-04-29 10:13:25 +02:00
- bugfix remove constant DS as shortcut for DIRECTORY_SEPARATOR as the user may have defined it to something else https://github.com/smarty-php/smarty/issues/277
This commit is contained in:
@@ -29,7 +29,7 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
|
||||
{
|
||||
$source = &$_template->source;
|
||||
$smarty = &$_template->smarty;
|
||||
$_compile_dir_sep = $smarty->use_sub_dirs ? DS : '^';
|
||||
$_compile_dir_sep = $smarty->use_sub_dirs ? $smarty->ds : '^';
|
||||
$_filepath = sha1($source->uid . $smarty->_joined_template_dir);
|
||||
$cached->filepath = $smarty->getCacheDir();
|
||||
if (isset($_template->cache_id)) {
|
||||
@@ -41,8 +41,8 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
|
||||
}
|
||||
// if use_sub_dirs, break file into directories
|
||||
if ($smarty->use_sub_dirs) {
|
||||
$cached->filepath .= $_filepath[ 0 ] . $_filepath[ 1 ] . DS . $_filepath[ 2 ] . $_filepath[ 3 ] . DS .
|
||||
$_filepath[ 4 ] . $_filepath[ 5 ] . DS;
|
||||
$cached->filepath .= $_filepath[ 0 ] . $_filepath[ 1 ] . $smarty->ds . $_filepath[ 2 ] . $_filepath[ 3 ] . $smarty->ds .
|
||||
$_filepath[ 4 ] . $_filepath[ 5 ] . $smarty->ds;
|
||||
}
|
||||
$cached->filepath .= $_filepath;
|
||||
$basename = $source->handler->getBasename($source);
|
||||
|
||||
Reference in New Issue
Block a user