From f210e32d1e124ada488130d72c54b5d360c0317c Mon Sep 17 00:00:00 2001 From: messju Date: Fri, 29 Aug 2003 08:49:51 +0000 Subject: [PATCH] made rmdir a bit more optimistic. especially it now removes directories correctly that where created accidently by "safe_mode=On && $use_sub_dirs=true" --- libs/core/core.rmdir.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/libs/core/core.rmdir.php b/libs/core/core.rmdir.php index 7169a3b9..01c6c6bb 100644 --- a/libs/core/core.rmdir.php +++ b/libs/core/core.rmdir.php @@ -40,18 +40,14 @@ function smarty_core_rmdir($params, &$smarty) } } } - closedir($_handle); + } - if ($params['level']) { - @rmdir($params['dirname']); - } + if ($params['level']) { + return @rmdir($params['dirname']); + } + return (bool)$_handle; - return true; - - } else { - return false; - } } /* vim: set expandtab: */