mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/17361] Remove temp files always
PHPBB-17361
This commit is contained in:
parent
9bf9538dc6
commit
be3966c0cb
2 changed files with 6 additions and 4 deletions
|
@ -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']));
|
$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;
|
$return = symfony_command::FAILURE;
|
||||||
$progress->setMessage('<error>' . $this->language->lang('CLI_THUMBNAIL_SKIPPED', $row['real_filename'], $row['physical_filename']) . '</error>');
|
$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'));
|
$this->storage->write('thumb_' . $row['physical_filename'], fopen($destination, 'rb'));
|
||||||
|
|
||||||
@unlink($source);
|
|
||||||
@unlink($destination);
|
|
||||||
|
|
||||||
$thumbnail_created[] = (int) $row['attach_id'];
|
$thumbnail_created[] = (int) $row['attach_id'];
|
||||||
|
|
||||||
if (count($thumbnail_created) === 250)
|
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>');
|
$progress->setMessage('<info>' . $this->language->lang('CLI_THUMBNAIL_SKIPPED', $row['real_filename'], $row['physical_filename']) . '</info>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@unlink($source);
|
||||||
|
@unlink($destination);
|
||||||
}
|
}
|
||||||
|
|
||||||
$progress->advance();
|
$progress->advance();
|
||||||
|
|
Loading…
Add table
Reference in a new issue