From 6b5fdc730fe1b73bab9ecfe748009bc90d1950f3 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Tue, 17 Jun 2014 22:16:28 +0200 Subject: [PATCH] [ticket/12692] Remove a not and swap the blocks in the corresponding if PHPBB3-12692 --- .../phpbb/console/command/thumbnail/generate.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/phpBB/phpbb/console/command/thumbnail/generate.php b/phpBB/phpbb/console/command/thumbnail/generate.php index ac9d18d933..1cfb2159d9 100644 --- a/phpBB/phpbb/console/command/thumbnail/generate.php +++ b/phpBB/phpbb/console/command/thumbnail/generate.php @@ -103,14 +103,7 @@ class generate extends \phpbb\console\command\command $source = $this->phpbb_root_path . 'files/' . $row['physical_filename']; $destination = $this->phpbb_root_path . 'files/thumb_' . $row['physical_filename']; - if (!create_thumbnail($source, $destination, $row['mimetype'])) - { - if ($input->getOption('verbose')) - { - $output->writeln('' . $this->user->lang('THUMBNAIL_SKIPPED', $row['real_filename'], $row['physical_filename']) . ''); - } - } - else + if (create_thumbnail($source, $destination, $row['mimetype'])) { $thumbnail_created[] = $row['attach_id']; 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'])); } } + else + { + if ($input->getOption('verbose')) + { + $output->writeln('' . $this->user->lang('THUMBNAIL_SKIPPED', $row['real_filename'], $row['physical_filename']) . ''); + } + } } } $this->db->sql_freeresult($result);