Browse Source

Remove redundant if statement (#8119)

pull/8145/head
Aleksander Machniak 4 years ago
parent
commit
e23d51a23e
  1. 8
      program/actions/mail/attachment_delete.php

8
program/actions/mail/attachment_delete.php

@ -37,11 +37,9 @@ class rcmail_action_mail_attachment_delete extends rcmail_action_mail_attachment
if (is_array($attachment)) {
$attachment = $rcmail->plugins->exec_hook('attachment_delete', $attachment);
if ($attachment['status']) {
if (!empty(self::$COMPOSE['attachments'][self::$file_id])) {
$rcmail->session->remove(self::$SESSION_KEY . '.attachments.' . self::$file_id);
$rcmail->output->command('remove_from_attachment_list', 'rcmfile' . self::$file_id);
}
if (!empty($attachment['status'])) {
$rcmail->session->remove(self::$SESSION_KEY . '.attachments.' . self::$file_id);
$rcmail->output->command('remove_from_attachment_list', 'rcmfile' . self::$file_id);
}
}

Loading…
Cancel
Save