Skip to content

Commit

Permalink
PowerPoint2007 & ODPresentation Writer : Use of the disk caching dire…
Browse files Browse the repository at this point in the history
…ctory for temporary files
  • Loading branch information
nhalle authored and Progi1984 committed Dec 11, 2023
1 parent 54e9058 commit d49b610
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/changes/1.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/PhpPresentation/Writer/ODPresentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/PhpPresentation/Writer/PowerPoint2007.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d49b610

Please sign in to comment.