1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

update improvements

This commit is contained in:
Thomas Citharel 2015-02-14 16:15:17 +01:00
parent 650928831b
commit 8df902951b
2 changed files with 20 additions and 5 deletions

View file

@ -78,12 +78,16 @@ function pdoDrivers() {
* Here in case of .gitignore files
*/
function delTree($dir) {
function delTree($dir, $withdirectory="true") {
$files = array_diff(scandir($dir), array('.','..'));
foreach ($files as $file) {
(is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file");
}
return rmdir($dir);
if ($withdirectory) {
return rmdir($dir);
} else {
return true;
}
}
function generate_salt() {