extend last smarty bugfix patch

References 762283c and ef90f8e

see 8d5fa36a80
This commit is contained in:
Ian 2015-01-22 10:58:30 +01:00
parent 3e7e6a03ed
commit e483598fb3
2 changed files with 4 additions and 4 deletions

View File

@ -147,10 +147,10 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
$_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null;
$_dir_sep = $smarty->use_sub_dirs ? '/' : '^';
$_compile_id_offset = $smarty->use_sub_dirs ? 3 : 0;
if (($_dir = realpath($smarty->getCacheDir())) === false) {
$_dir = realpath($smarty->getCacheDir()) . '/';
if ($_dir == '/') { //We should never want to delete this!
return 0;
}
$_dir .= '/';
$_dir_length = strlen($_dir);
if (isset($_cache_id)) {
$_cache_id_parts = explode('|', $_cache_id);

View File

@ -191,10 +191,10 @@ class Smarty_Internal_Utility
*/
public static function clearCompiledTemplate($resource_name, $compile_id, $exp_time, Smarty $smarty)
{
if (($_compile_dir = realpath($smarty->getCompileDir())) === false) {
$_compile_dir = realpath($smarty->getCompileDir()) . '/';
if ($_compile_dir == '/') { //We should never want to delete this!
return 0;
}
$_compile_dir .= '/';
$_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null;
$_dir_sep = $smarty->use_sub_dirs ? '/' : '^';
if (isset($resource_name)) {