mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
made rmdir a bit more optimistic. especially it now removes
directories correctly that where created accidently by "safe_mode=On && $use_sub_dirs=true"
This commit is contained in:
@@ -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: */
|
||||
|
Reference in New Issue
Block a user