mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/12692] Remove a not and swap the blocks in the corresponding if
PHPBB3-12692
This commit is contained in:
parent
3f0fa70e3a
commit
6b5fdc730f
1 changed files with 8 additions and 8 deletions
|
@ -103,14 +103,7 @@ class generate extends \phpbb\console\command\command
|
||||||
$source = $this->phpbb_root_path . 'files/' . $row['physical_filename'];
|
$source = $this->phpbb_root_path . 'files/' . $row['physical_filename'];
|
||||||
$destination = $this->phpbb_root_path . 'files/thumb_' . $row['physical_filename'];
|
$destination = $this->phpbb_root_path . 'files/thumb_' . $row['physical_filename'];
|
||||||
|
|
||||||
if (!create_thumbnail($source, $destination, $row['mimetype']))
|
if (create_thumbnail($source, $destination, $row['mimetype']))
|
||||||
{
|
|
||||||
if ($input->getOption('verbose'))
|
|
||||||
{
|
|
||||||
$output->writeln('<info>' . $this->user->lang('THUMBNAIL_SKIPPED', $row['real_filename'], $row['physical_filename']) . '</info>');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
$thumbnail_created[] = $row['attach_id'];
|
$thumbnail_created[] = $row['attach_id'];
|
||||||
if ($input->getOption('verbose'))
|
if ($input->getOption('verbose'))
|
||||||
|
@ -118,6 +111,13 @@ class generate extends \phpbb\console\command\command
|
||||||
$output->writeln($this->user->lang('THUMBNAIL_GENERATED', $row['real_filename'], $row['physical_filename']));
|
$output->writeln($this->user->lang('THUMBNAIL_GENERATED', $row['real_filename'], $row['physical_filename']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($input->getOption('verbose'))
|
||||||
|
{
|
||||||
|
$output->writeln('<info>' . $this->user->lang('THUMBNAIL_SKIPPED', $row['real_filename'], $row['physical_filename']) . '</info>');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
Loading…
Add table
Reference in a new issue