1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/17361] Update thumbnail_test test

PHPBB-17361
This commit is contained in:
Ruben Calvo
2024-11-28 22:30:37 +01:00
parent 4becf438e1
commit 9bf9538dc6
2 changed files with 21 additions and 9 deletions

View File

@@ -151,11 +151,12 @@ class generate extends \phpbb\console\command\command
$destination = tempnam(sys_get_temp_dir(), 'thumbnail_destination');
file_put_contents($source, $this->storage->read($row['physical_filename']));
@unlink($source);
if (create_thumbnail($source, $destination, $row['mimetype']))
{
$this->storage->write('thumb_' . $row['physical_filename'], fopen($destination, 'rb'));
@unlink($source);
@unlink($destination);
$thumbnail_created[] = (int) $row['attach_id'];