mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/17361] Remove temp files always
PHPBB-17361
This commit is contained in:
@@ -132,7 +132,9 @@ class delete extends \phpbb\console\command\command
|
||||
}
|
||||
|
||||
$progress->setMessage($this->language->lang('CLI_THUMBNAIL_DELETED', $row['real_filename'], $row['physical_filename']));
|
||||
} catch (storage_exception $e) {
|
||||
}
|
||||
catch (storage_exception $e)
|
||||
{
|
||||
$return = symfony_command::FAILURE;
|
||||
$progress->setMessage('<error>' . $this->language->lang('CLI_THUMBNAIL_SKIPPED', $row['real_filename'], $row['physical_filename']) . '</error>');
|
||||
|
||||
|
@@ -156,9 +156,6 @@ class generate extends \phpbb\console\command\command
|
||||
{
|
||||
$this->storage->write('thumb_' . $row['physical_filename'], fopen($destination, 'rb'));
|
||||
|
||||
@unlink($source);
|
||||
@unlink($destination);
|
||||
|
||||
$thumbnail_created[] = (int) $row['attach_id'];
|
||||
|
||||
if (count($thumbnail_created) === 250)
|
||||
@@ -173,6 +170,9 @@ class generate extends \phpbb\console\command\command
|
||||
{
|
||||
$progress->setMessage('<info>' . $this->language->lang('CLI_THUMBNAIL_SKIPPED', $row['real_filename'], $row['physical_filename']) . '</info>');
|
||||
}
|
||||
|
||||
@unlink($source);
|
||||
@unlink($destination);
|
||||
}
|
||||
|
||||
$progress->advance();
|
||||
|
Reference in New Issue
Block a user