diff --git a/.gitignore b/.gitignore index e62f8c8..242c5f3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ /public_html/js /node_modules /backup -/tmp \ No newline at end of file +/tmp +/public_html/tmp \ No newline at end of file diff --git a/build/api/module/professor/pdfController.php b/build/api/module/professor/pdfController.php index 48c64a0..2971bd4 100644 --- a/build/api/module/professor/pdfController.php +++ b/build/api/module/professor/pdfController.php @@ -140,9 +140,15 @@ class pdfController{ $body = self::generate_pdf_body($data); /* (2) Set headers */ + + $fullname = $data['prof']['firstName'].' '.$data['prof']['lastName']; + $date = date('d-m-Y'); + $title = "Fiche enseignant - $fullname ($date)"; + $headers = [ - 'Content-Description' => 'File Transfer', + // 'Content-Description' => 'File Transfer', 'Content-Transfer-Encoding' => 'binary', + 'Content-Disposition' => 'attachment; filename=\"'.$title.'\"', 'Cache-Control' => 'public, must-revalidate, max-age=0', 'Pragma' => 'public', 'X-Generator' => 'mPDF',