mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
-improvement not to delete files starting with '.' from cache and template_c folders on clearCompiledTemplate() and clearCache()
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== SVN trunk =====
|
===== SVN trunk =====
|
||||||
|
17/02/2011
|
||||||
|
-improvement not to delete files starting with '.' from cache and template_c folders on clearCompiledTemplate() and clearCache()
|
||||||
|
|
||||||
16/02/2011
|
16/02/2011
|
||||||
-fixed typo in exception message of Smarty_Internal_Template
|
-fixed typo in exception message of Smarty_Internal_Template
|
||||||
-improvement allow leading spaces on } tag closing if auto_literal is enabled
|
-improvement allow leading spaces on } tag closing if auto_literal is enabled
|
||||||
|
@@ -159,7 +159,7 @@ class Smarty_Internal_CacheResource_File {
|
|||||||
$_cacheDirs = new RecursiveDirectoryIterator($_dir);
|
$_cacheDirs = new RecursiveDirectoryIterator($_dir);
|
||||||
$_cache = new RecursiveIteratorIterator($_cacheDirs, RecursiveIteratorIterator::CHILD_FIRST);
|
$_cache = new RecursiveIteratorIterator($_cacheDirs, RecursiveIteratorIterator::CHILD_FIRST);
|
||||||
foreach ($_cache as $_file) {
|
foreach ($_cache as $_file) {
|
||||||
if (strpos($_file, '.svn') !== false) continue;
|
if (substr($_file->getBasename(),0,1) == '.') continue;
|
||||||
// directory ?
|
// directory ?
|
||||||
if ($_file->isDir()) {
|
if ($_file->isDir()) {
|
||||||
if (!$_cache->isDot()) {
|
if (!$_cache->isDot()) {
|
||||||
|
@@ -66,7 +66,7 @@ class Smarty_Internal_Utility {
|
|||||||
$_compileDirs = new RecursiveDirectoryIterator($_dir);
|
$_compileDirs = new RecursiveDirectoryIterator($_dir);
|
||||||
$_compile = new RecursiveIteratorIterator($_compileDirs);
|
$_compile = new RecursiveIteratorIterator($_compileDirs);
|
||||||
foreach ($_compile as $_fileinfo) {
|
foreach ($_compile as $_fileinfo) {
|
||||||
if (strpos($_fileinfo, '.svn') !== false) continue;
|
if (substr($_fileinfo->getBasename(),0,1) == '.') continue;
|
||||||
$_file = $_fileinfo->getFilename();
|
$_file = $_fileinfo->getFilename();
|
||||||
if (!substr_compare($_file, $extention, - strlen($extention)) == 0) continue;
|
if (!substr_compare($_file, $extention, - strlen($extention)) == 0) continue;
|
||||||
if ($_fileinfo->getPath() == substr($_dir, 0, -1)) {
|
if ($_fileinfo->getPath() == substr($_dir, 0, -1)) {
|
||||||
@@ -131,7 +131,7 @@ class Smarty_Internal_Utility {
|
|||||||
$_compileDirs = new RecursiveDirectoryIterator($_dir);
|
$_compileDirs = new RecursiveDirectoryIterator($_dir);
|
||||||
$_compile = new RecursiveIteratorIterator($_compileDirs);
|
$_compile = new RecursiveIteratorIterator($_compileDirs);
|
||||||
foreach ($_compile as $_fileinfo) {
|
foreach ($_compile as $_fileinfo) {
|
||||||
if (strpos($_fileinfo, '.svn') !== false) continue;
|
if (substr($_fileinfo->getBasename(),0,1) == '.') continue;
|
||||||
$_file = $_fileinfo->getFilename();
|
$_file = $_fileinfo->getFilename();
|
||||||
if (!substr_compare($_file, $extention, - strlen($extention)) == 0) continue;
|
if (!substr_compare($_file, $extention, - strlen($extention)) == 0) continue;
|
||||||
if ($_fileinfo->getPath() == substr($_dir, 0, -1)) {
|
if ($_fileinfo->getPath() == substr($_dir, 0, -1)) {
|
||||||
@@ -195,7 +195,7 @@ class Smarty_Internal_Utility {
|
|||||||
$_compileDirs = new RecursiveDirectoryIterator($_dir);
|
$_compileDirs = new RecursiveDirectoryIterator($_dir);
|
||||||
$_compile = new RecursiveIteratorIterator($_compileDirs, RecursiveIteratorIterator::CHILD_FIRST);
|
$_compile = new RecursiveIteratorIterator($_compileDirs, RecursiveIteratorIterator::CHILD_FIRST);
|
||||||
foreach ($_compile as $_file) {
|
foreach ($_compile as $_file) {
|
||||||
if (strpos($_file, '.svn') !== false) continue;
|
if (substr($_file->getBasename(),0,1) == '.') continue;
|
||||||
if ($_file->isDir()) {
|
if ($_file->isDir()) {
|
||||||
if (!$_compile->isDot()) {
|
if (!$_compile->isDot()) {
|
||||||
// delete folder if empty
|
// delete folder if empty
|
||||||
|
Reference in New Issue
Block a user