diff options
author | Thomas Citharel <tcit@tcit.fr> | 2015-02-14 16:15:17 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2015-02-14 16:15:17 +0100 |
commit | 8df902951b4a42436a3fb09de610fd94e756f96f (patch) | |
tree | 2772b5e222cf1996737647648e181bca50a7adf3 /install/install_functions.php | |
parent | 650928831b547ad8a00f8d70e8d3150c3fe0597d (diff) | |
download | wallabag-8df902951b4a42436a3fb09de610fd94e756f96f.tar.gz wallabag-8df902951b4a42436a3fb09de610fd94e756f96f.tar.zst wallabag-8df902951b4a42436a3fb09de610fd94e756f96f.zip |
update improvements
Diffstat (limited to 'install/install_functions.php')
-rw-r--r-- | install/install_functions.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/install/install_functions.php b/install/install_functions.php index a4830569..3cfe13fb 100644 --- a/install/install_functions.php +++ b/install/install_functions.php | |||
@@ -78,12 +78,16 @@ function pdoDrivers() { | |||
78 | * Here in case of .gitignore files | 78 | * Here in case of .gitignore files |
79 | */ | 79 | */ |
80 | 80 | ||
81 | function delTree($dir) { | 81 | function delTree($dir, $withdirectory="true") { |
82 | $files = array_diff(scandir($dir), array('.','..')); | 82 | $files = array_diff(scandir($dir), array('.','..')); |
83 | foreach ($files as $file) { | 83 | foreach ($files as $file) { |
84 | (is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file"); | 84 | (is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file"); |
85 | } | 85 | } |
86 | return rmdir($dir); | 86 | if ($withdirectory) { |
87 | return rmdir($dir); | ||
88 | } else { | ||
89 | return true; | ||
90 | } | ||
87 | } | 91 | } |
88 | 92 | ||
89 | function generate_salt() { | 93 | function generate_salt() { |