소스 검색

Force to download.

Julio Montoya 9 년 전
부모
커밋
8ec7bffbcd
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      main/inc/lib/export.lib.inc.php

+ 4 - 4
main/inc/lib/export.lib.inc.php

@@ -46,12 +46,12 @@ class Export
         $writer = new CsvWriter();
         $writer->setStream(fopen($filePath, 'w'));
 
-        foreach($data as $item) {
+        foreach ($data as $item) {
             $writer->writeItem($item);
         }
         $writer->finish();
 
-        DocumentManager::file_send_for_download($filePath, false, $filename.'.csv');
+        DocumentManager::file_send_for_download($filePath, true, $filename.'.csv');
         exit;
 	}
 
@@ -74,7 +74,7 @@ class Export
 
         $writer->finish();
 
-        DocumentManager::file_send_for_download($filePath, false, $filename.'.xls');
+        DocumentManager::file_send_for_download($filePath, true, $filename.'.xls');
         exit;
 	}
 
@@ -104,7 +104,7 @@ class Export
         }
         fwrite($handle, '</table></body></html>');
         fclose($handle);
-        DocumentManager::file_send_for_download($file, false, $filename.'.xls');
+        DocumentManager::file_send_for_download($file, true, $filename.'.xls');
     }
 
     /**