Skip to content

Commit ad70328

Browse files
authored
Merge pull request #781 from Progi1984/pr601
PowerPoint2007 & ODPresentation Writer : Use of the disk caching directory for temporary files
2 parents 54e9058 + d49b610 commit ad70328

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

docs/changes/1.1.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
- PowerPoint2007 Reader : Load images from file only if valid - [@aelliott1485](https://github.com/aelliott1485) in [#775](https://github.com/PHPOffice/PHPPresentation/pull/775)
3030
- PowerPoint2007 Writer : Fixed broken video file relationship - [@potofcoffee](https://github.com/potofcoffee) in [#776](https://github.com/PHPOffice/PHPPresentation/pull/776)
3131
- 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)
32+
- 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)
3233

3334
## Miscellaneous
3435

src/PhpPresentation/Writer/ODPresentation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function save(string $pFilename): void
8181
// If $pFilename is php://output or php://stdout, make it a temporary file...
8282
$originalFilename = $pFilename;
8383
if ('php://output' == strtolower($pFilename) || 'php://stdout' == strtolower($pFilename)) {
84-
$pFilename = @tempnam('./', 'phppttmp');
84+
$pFilename = @tempnam($this->diskCachingDirectory, 'phppttmp');
8585
if ('' == $pFilename) {
8686
$pFilename = $originalFilename;
8787
}

src/PhpPresentation/Writer/PowerPoint2007.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function save(string $pFilename): void
7979
// If $pFilename is php://output or php://stdout, make it a temporary file...
8080
$originalFilename = $pFilename;
8181
if ('php://output' == strtolower($pFilename) || 'php://stdout' == strtolower($pFilename)) {
82-
$pFilename = @tempnam('./', 'phppttmp');
82+
$pFilename = @tempnam($this->diskCachingDir, 'phppttmp');
8383
if ('' == $pFilename) {
8484
$pFilename = $originalFilename;
8585
}

0 commit comments

Comments
 (0)