mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 05:18:52 +00:00
[ticket/17361] Remove temp files
PHPBB-17361
This commit is contained in:
parent
a8399c1431
commit
4becf438e1
1 changed files with 2 additions and 0 deletions
|
@ -151,10 +151,12 @@ class generate extends \phpbb\console\command\command
|
||||||
$destination = tempnam(sys_get_temp_dir(), 'thumbnail_destination');
|
$destination = tempnam(sys_get_temp_dir(), 'thumbnail_destination');
|
||||||
|
|
||||||
file_put_contents($source, $this->storage->read($row['physical_filename']));
|
file_put_contents($source, $this->storage->read($row['physical_filename']));
|
||||||
|
@unlink($source);
|
||||||
|
|
||||||
if (create_thumbnail($source, $destination, $row['mimetype']))
|
if (create_thumbnail($source, $destination, $row['mimetype']))
|
||||||
{
|
{
|
||||||
$this->storage->write('thumb_' . $row['physical_filename'], fopen($destination, 'rb'));
|
$this->storage->write('thumb_' . $row['physical_filename'], fopen($destination, 'rb'));
|
||||||
|
@unlink($destination);
|
||||||
|
|
||||||
$thumbnail_created[] = (int) $row['attach_id'];
|
$thumbnail_created[] = (int) $row['attach_id'];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue