cleaned up calls to readdir()

This commit is contained in:
messju
2003-03-18 22:47:16 +00:00
parent 42a49792aa
commit 41b3d4b7a8
2 changed files with 3 additions and 2 deletions

1
NEWS
View File

@@ -1,3 +1,4 @@
- cleaned up calls to readdir() (messju)
- fixed bug with passing multiple modifiers to a parameter
(Monte)
- updated docs for html_checkboxes, html_options and html_radios (messju)

View File

@@ -2142,7 +2142,7 @@ class Smarty
} else {
// remove matching file names
$handle = opendir($auto_base);
while ($filename = readdir($handle)) {
while (false !== ($filename = readdir($handle))) {
if($filename == '.' || $filename == '..') {
continue;
} elseif (substr($auto_base . DIR_SEP . $filename,0,strlen($tname)) == $tname) {
@@ -2168,7 +2168,7 @@ class Smarty
if($handle = @opendir($dirname)) {
while (null != ($entry = readdir($handle))) {
while (false !== ($entry = readdir($handle))) {
if ($entry != '.' && $entry != '..') {
if (@is_dir($dirname . DIR_SEP . $entry)) {
$this->_rmdir($dirname . DIR_SEP . $entry, $level + 1, $exp_time);