From 66a1a342a8581baf8bbb7efed733c7900a064f36 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Fri, 2 Sep 2011 14:05:41 +0000 Subject: [PATCH] Fixed issue #5432: Option to export responses to PDF by participant fails when using IE git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_ci@10924 b72ed6b6-b9f8-46b5-92b4-906544132732 --- application/controllers/printanswers.php | 27 +----------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/application/controllers/printanswers.php b/application/controllers/printanswers.php index e4393dbcc65..fb86ecc1fa3 100644 --- a/application/controllers/printanswers.php +++ b/application/controllers/printanswers.php @@ -281,32 +281,7 @@ function view($surveyid,$printableexport=FALSE) header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); $sExportFileName=sanitize_filename($surveyname); - if (preg_match("/MSIE/i", $_SERVER["HTTP_USER_AGENT"])) - { - /* - * $dateiname = $InternalReferenceNumber.'.pdf'; - $pdf->Output($dateiname, 'F'); - header('Content-type: application/pdf'); - header('Content-Disposition: attachment; filename="'.basename($dateiname).'"'); - readfile($dateiname); - */ - - header("Content-type: application/pdf"); - header("Content-Transfer-Encoding: binary"); - - - header("Content-Disposition: Attachment; filename=\"". $sExportFileName ."-".$surveyid.".pdf\""); - - $this->pdf->Output($this->config->item('tempdir').'/'.$clang->gT($surveyname)."-".$surveyid.".pdf", "F"); - header("Content-Length: ". filesize($this->config->item('tempdir').'/'.$sExportFileName."-".$surveyid.".pdf")); - readfile($this->config->item('tempdir').'/'.$sExportFileName."-".$surveyid.".pdf"); - unlink($this->config->item('tempdir').'/'.$sExportFileName."-".$surveyid.".pdf"); - - } - else - { - $this->pdf->Output($sExportFileName."-".$surveyid.".pdf","D"); - } + $this->pdf->Output($sExportFileName."-".$surveyid.".pdf","D"); }