mirror of
				https://gitlab.com/animath/si/plateforme-corres2math.git
				synced 2025-11-04 16:42:33 +01:00 
			
		
		
		
	Les archives d'autorisations parentales étaient invalides
This commit is contained in:
		@@ -155,7 +155,9 @@ function getZipFile($problem, $team_id = -1)
 | 
			
		||||
	foreach ($data as $file) {
 | 
			
		||||
		$file_id = $file->getFileId();
 | 
			
		||||
		$user = User::fromId($file->getUserId());
 | 
			
		||||
		$name = "Autorisation de droit à l'image de " . $user->getFirstName() . " " . $user->getSurname() . ".pdf";
 | 
			
		||||
        $mime_type = finfo_file(finfo_open(FILEINFO_MIME_TYPE), "$LOCAL_PATH/files/$file_id");
 | 
			
		||||
        $ext = $mime_type == "application/pdf" ? "pdf" : ($mime_type == "image/png" ? "png" : "jpg");
 | 
			
		||||
		$name = "Autorisation de droit à l'image de " . $user->getFirstName() . " " . $user->getSurname() . "." . $ext;
 | 
			
		||||
 | 
			
		||||
		$zip->addFile("$LOCAL_PATH/files/$file_id", $name);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user