diff --git a/bl-kernel/helpers/filesystem.class.php b/bl-kernel/helpers/filesystem.class.php index eaf622ff..041c7722 100644 --- a/bl-kernel/helpers/filesystem.class.php +++ b/bl-kernel/helpers/filesystem.class.php @@ -122,23 +122,26 @@ class Filesystem { // Delete a file or directory recursive // The directory is delete - public static function deleteRecursive($source) + public static function deleteRecursive($source, $deleteDirectory=true) { if (!self::directoryExists($source)) { return false; } - foreach(new RecursiveIteratorIterator( + foreach (new RecursiveIteratorIterator( new RecursiveDirectoryIterator($source, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST) as $item) { - if($item->isFile()) { + if ($item->isFile()) { unlink($item); } else { rmdir($item); } } - return rmdir($source); + if ($deleteDirectory) { + return rmdir($source); + } + return true; } // Compress a file or directory @@ -216,7 +219,7 @@ class Filesystem { $number = 0; $tmpName = $filename.'_'.$number.'.'.$fileExtension; while (Sanitize::pathFile($path.$tmpName)) { - $number++; + $number = $number + 1; $tmpName = $filename.'_'.$number.'.'.$fileExtension; } } diff --git a/bl-plugins/remote-content/plugin.php b/bl-plugins/remote-content/plugin.php index 5ca0af69..7d2c5b07 100644 --- a/bl-plugins/remote-content/plugin.php +++ b/bl-plugins/remote-content/plugin.php @@ -96,6 +96,8 @@ class pluginRemoteContent extends Plugin { Filesystem::deleteRecursive(PATH_UPLOADS); mkdir(PATH_PAGES, 0755, true); mkdir(PATH_UPLOADS, 0755, true); + mkdir(PATH_UPLOADS_PROFILES, 0755, true); + mkdir(PATH_UPLOADS_THUMBNAILS, 0755, true); return true; } diff --git a/install.php b/install.php index 3f47a215..61cf61ab 100644 --- a/install.php +++ b/install.php @@ -591,12 +591,16 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { '; - echo '
'.$error.' | +
---|