Effacer createZip

This commit is contained in:
fredtempez 2021-02-18 12:40:41 +01:00
parent 0e4d1ed570
commit 74f0f60a8a
1 changed files with 0 additions and 31 deletions

View File

@ -240,37 +240,6 @@ class addon extends common {
closedir($dir);
}
/*
* Création récursive d'un zip
* https://makitweb.com/how-to-create-and-download-a-zip-file-with-php/
*/
private function createZip($zip,$dir){
if (is_dir($dir)){
if ($dh = opendir($dir)){
while (($file = readdir($dh)) !== false){
// If file
if (is_file($dir.$file)) {
if($file != '' && $file != '.' && $file != '..'){
$zip->addFile($dir.$file);
}
}
else{
// If directory
if(is_dir($dir.$file) ){
if($file != '' && $file != '.' && $file != '..'){
// Add empty directory
$zip->addEmptyDir($dir.$file);
$folder = $dir.$file.'/';
// Read data of the folder
$this->createZip($zip,$folder);
}
}
}
}
closedir($dh);
}
}
}
/*
* Export des données d'un module externes ou interne à module.json