From b95a14c0de93965cd5eb29edcedae60d7cf97e8b Mon Sep 17 00:00:00 2001 From: Adnan Date: Tue, 17 Aug 2010 22:26:15 +0500 Subject: [PATCH] TCPDF: merge conflict fixed --- libraries/tcpdf/tcpdf.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/libraries/tcpdf/tcpdf.php b/libraries/tcpdf/tcpdf.php index ad433cec8f16..3d134b61de07 100644 --- a/libraries/tcpdf/tcpdf.php +++ b/libraries/tcpdf/tcpdf.php @@ -2980,8 +2980,7 @@ public function Output($name='',$dest='') { if(ob_get_contents()) { $this->Error('Some data has already been output, can\'t send PDF file'); } - //ob_end_clean(); - //ob_start(); + if(php_sapi_name()!='cli') { //We send to a browser header('Content-Type: application/pdf'); @@ -2996,18 +2995,10 @@ public function Output($name='',$dest='') { } case 'D': { //Download file -<<<<<<< HEAD if(ob_get_contents()) { $this->Error(ob_get_contents().'Some data has already been output, can\'t send PDF file'); } - //ob_end_clean(); - //ob_start(); -======= - // if(ob_get_contents()) { - // $this->Error(ob_get_contents().'Some data has already been output, can\'t send PDF file'); - //} - ->>>>>>> 14b26e3... TCPDF Class: Clean output buffer before downloading file + if(isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')) { header('Content-Type: application/force-download'); } else {