diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-08-03 13:21:11 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-08-03 13:21:11 +0200 |
commit | c766284d522206578e7ec154961e0fce456f70c8 (patch) | |
tree | a5246151bf8278a0e8053b9dd1ce9d770073c50b /install/install_functions.php | |
parent | c0cb52c07439c974075c302a190a034a8cce4f92 (diff) | |
parent | e968ec6c2244aee600358b3c87648b2409c97945 (diff) | |
download | wallabag-c766284d522206578e7ec154961e0fce456f70c8.tar.gz wallabag-c766284d522206578e7ec154961e0fce456f70c8.tar.zst wallabag-c766284d522206578e7ec154961e0fce456f70c8.zip |
Merge pull request #1267 from wallabag/dev1.9.1
1.9.1
Diffstat (limited to 'install/install_functions.php')
-rw-r--r-- | install/install_functions.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/install/install_functions.php b/install/install_functions.php index 3cfe13fb..a3bf3661 100644 --- a/install/install_functions.php +++ b/install/install_functions.php | |||
@@ -78,10 +78,12 @@ function pdoDrivers() { | |||
78 | * Here in case of .gitignore files | 78 | * Here in case of .gitignore files |
79 | */ | 79 | */ |
80 | 80 | ||
81 | function delTree($dir, $withdirectory="true") { | 81 | function delTree($dir, $withdirectory=true, $hiddenfiles = true) { |
82 | $files = array_diff(scandir($dir), array('.','..')); | 82 | if ($hiddenfiles) { |
83 | foreach ($files as $file) { | 83 | $files = array_diff(scandir($dir), array('.','..')); |
84 | (is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file"); | 84 | foreach ($files as $file) { |
85 | (is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file"); | ||
86 | } | ||
85 | } | 87 | } |
86 | if ($withdirectory) { | 88 | if ($withdirectory) { |
87 | return rmdir($dir); | 89 | return rmdir($dir); |
@@ -108,4 +110,4 @@ function executeQuery($handle, $sql, $params) { | |||
108 | } | 110 | } |
109 | } | 111 | } |
110 | 112 | ||
111 | ?> \ No newline at end of file | 113 | ?> |