diff --git a/docs/changes/1.1.0.md b/docs/changes/1.1.0.md index e09f322ef..6e1c14c9c 100644 --- a/docs/changes/1.1.0.md +++ b/docs/changes/1.1.0.md @@ -29,6 +29,7 @@ - PowerPoint2007 Reader : Load images from file only if valid - [@aelliott1485](https://github.com/aelliott1485) in [#775](https://github.com/PHPOffice/PHPPresentation/pull/775) - PowerPoint2007 Writer : Fixed broken video file relationship - [@potofcoffee](https://github.com/potofcoffee) in [#776](https://github.com/PHPOffice/PHPPresentation/pull/776) - PowerPoint2007 Writer : Fixed issue when first element in series is null - [@ksmeeks0001](https://github.com/ksmeeks0001) in [#778](https://github.com/PHPOffice/PHPPresentation/pull/778) +- PowerPoint2007 & ODPresentation Writer : Use of the disk caching directory for temporary files - [@nhalle](https://github.com/nhalle) in [#781](https://github.com/PHPOffice/PHPPresentation/pull/781) ## Miscellaneous diff --git a/src/PhpPresentation/Writer/ODPresentation.php b/src/PhpPresentation/Writer/ODPresentation.php index 7d2ba6073..5c8432fac 100644 --- a/src/PhpPresentation/Writer/ODPresentation.php +++ b/src/PhpPresentation/Writer/ODPresentation.php @@ -81,7 +81,7 @@ public function save(string $pFilename): void // If $pFilename is php://output or php://stdout, make it a temporary file... $originalFilename = $pFilename; if ('php://output' == strtolower($pFilename) || 'php://stdout' == strtolower($pFilename)) { - $pFilename = @tempnam('./', 'phppttmp'); + $pFilename = @tempnam($this->diskCachingDirectory, 'phppttmp'); if ('' == $pFilename) { $pFilename = $originalFilename; } diff --git a/src/PhpPresentation/Writer/PowerPoint2007.php b/src/PhpPresentation/Writer/PowerPoint2007.php index 9c94d3f08..a116ca8a3 100644 --- a/src/PhpPresentation/Writer/PowerPoint2007.php +++ b/src/PhpPresentation/Writer/PowerPoint2007.php @@ -79,7 +79,7 @@ public function save(string $pFilename): void // If $pFilename is php://output or php://stdout, make it a temporary file... $originalFilename = $pFilename; if ('php://output' == strtolower($pFilename) || 'php://stdout' == strtolower($pFilename)) { - $pFilename = @tempnam('./', 'phppttmp'); + $pFilename = @tempnam($this->diskCachingDir, 'phppttmp'); if ('' == $pFilename) { $pFilename = $originalFilename; }