mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
update improvements
This commit is contained in:
parent
650928831b
commit
8df902951b
2 changed files with 20 additions and 5 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue