mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
bugfix PHP5.2 compatibility compromised by SplFileInfo::getBasename() (Issue 110)
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
===== trunk =====
|
||||
14.08.2012
|
||||
- bugfix PHP5.2 compatibility compromised by SplFileInfo::getBasename() (Issue 110)
|
||||
|
||||
01.08.2012
|
||||
- bugfix avoid PHP error on $smarty->configLoad(...) with invalid section specification (Forum Topic 22608)
|
||||
|
||||
|
@@ -178,7 +178,7 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource {
|
||||
$_cacheDirs = new RecursiveDirectoryIterator($_dir);
|
||||
$_cache = new RecursiveIteratorIterator($_cacheDirs, RecursiveIteratorIterator::CHILD_FIRST);
|
||||
foreach ($_cache as $_file) {
|
||||
if (substr($_file->getBasename(),0,1) == '.' || strpos($_file, '.svn') !== false) continue;
|
||||
if (substr(basename($_file->getPathname()),0,1) == '.' || strpos($_file, '.svn') !== false) continue;
|
||||
// directory ?
|
||||
if ($_file->isDir()) {
|
||||
if (!$_cache->isDot()) {
|
||||
|
@@ -72,7 +72,7 @@ class Smarty_Internal_Utility {
|
||||
$_compileDirs = new RecursiveDirectoryIterator($_dir);
|
||||
$_compile = new RecursiveIteratorIterator($_compileDirs);
|
||||
foreach ($_compile as $_fileinfo) {
|
||||
if (substr($_fileinfo->getBasename(),0,1) == '.' || strpos($_fileinfo, '.svn') !== false) continue;
|
||||
if (substr(basename($_file->getPathname()),0,1) == '.' || strpos($_fileinfo, '.svn') !== false) continue;
|
||||
$_file = $_fileinfo->getFilename();
|
||||
if (!substr_compare($_file, $extention, - strlen($extention)) == 0) continue;
|
||||
if ($_fileinfo->getPath() == substr($_dir, 0, -1)) {
|
||||
@@ -136,7 +136,7 @@ class Smarty_Internal_Utility {
|
||||
$_compileDirs = new RecursiveDirectoryIterator($_dir);
|
||||
$_compile = new RecursiveIteratorIterator($_compileDirs);
|
||||
foreach ($_compile as $_fileinfo) {
|
||||
if (substr($_fileinfo->getBasename(),0,1) == '.' || strpos($_fileinfo, '.svn') !== false) continue;
|
||||
if (substr(basename($_fileinfo->getPathname()),0,1) == '.' || strpos($_fileinfo, '.svn') !== false) continue;
|
||||
$_file = $_fileinfo->getFilename();
|
||||
if (!substr_compare($_file, $extention, - strlen($extention)) == 0) continue;
|
||||
if ($_fileinfo->getPath() == substr($_dir, 0, -1)) {
|
||||
@@ -231,7 +231,7 @@ class Smarty_Internal_Utility {
|
||||
}
|
||||
$_compile = new RecursiveIteratorIterator($_compileDirs, RecursiveIteratorIterator::CHILD_FIRST);
|
||||
foreach ($_compile as $_file) {
|
||||
if (substr($_file->getBasename(), 0, 1) == '.' || strpos($_file, '.svn') !== false)
|
||||
if (substr(basename($_file->getPathname()), 0, 1) == '.' || strpos($_file, '.svn') !== false)
|
||||
continue;
|
||||
|
||||
$_filepath = (string) $_file;
|
||||
|
Reference in New Issue
Block a user