Skip to content

Commit

Permalink
Merge pull request #781 from Progi1984/pr601
Browse files Browse the repository at this point in the history
PowerPoint2007 & ODPresentation Writer : Use of the disk caching directory for temporary files
  • Loading branch information
Progi1984 authored Dec 11, 2023
2 parents 54e9058 + d49b610 commit ad70328
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:/aelliott1485) in [#775](https:/PHPOffice/PHPPresentation/pull/775)
- PowerPoint2007 Writer : Fixed broken video file relationship - [@potofcoffee](https:/potofcoffee) in [#776](https:/PHPOffice/PHPPresentation/pull/776)
- PowerPoint2007 Writer : Fixed issue when first element in series is null - [@ksmeeks0001](https:/ksmeeks0001) in [#778](https:/PHPOffice/PHPPresentation/pull/778)
- PowerPoint2007 & ODPresentation Writer : Use of the disk caching directory for temporary files - [@nhalle](https:/nhalle) in [#781](https:/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 ad70328

Please sign in to comment.