Skip to content

Commit

Permalink
MDL-56642 dataformat: set temp dir
Browse files Browse the repository at this point in the history
Thanks to Chien Wen-Chang for proposing a patch
  • Loading branch information
marinaglancy committed Dec 7, 2016
1 parent e6cb76d commit 1491f21
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/classes/dataformat/spout_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ abstract class spout_base extends \core\dataformat\base {
*/
public function send_http_headers() {
$this->writer = \Box\Spout\Writer\WriterFactory::create($this->spouttype);
if (method_exists('setTempFolder', $this->writer)) {
$this->writer->setTempFolder(make_request_directory());
}
$filename = $this->filename . $this->get_extension();
$this->writer->openToBrowser($filename);
if ($this->sheettitle && $this->writer instanceof \Box\Spout\Writer\AbstractMultiSheetsWriter) {
Expand Down

0 comments on commit 1491f21

Please sign in to comment.