From 2db569ab19d1544775cf9c92b2a04a4ee320e159 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Thu, 31 Jan 2019 15:34:33 +0100 Subject: [PATCH] Remove superfluous exists check See #2825 --- .../install/files/lib/acp/form/ReactionTypeAddForm.class.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/form/ReactionTypeAddForm.class.php b/wcfsetup/install/files/lib/acp/form/ReactionTypeAddForm.class.php index 7b3baa7a00..d210544ac3 100644 --- a/wcfsetup/install/files/lib/acp/form/ReactionTypeAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/ReactionTypeAddForm.class.php @@ -12,7 +12,6 @@ use wcf\system\form\builder\field\RadioButtonFormField; use wcf\system\form\builder\field\ShowOrderFormField; use wcf\system\form\builder\field\TitleFormField; use wcf\system\form\builder\field\UploadFormField; -use wcf\util\StringUtil; /** * Represents the reaction type add form. @@ -126,10 +125,6 @@ class ReactionTypeAddForm extends AbstractFormBuilderForm { if (!$file->isProcessed()) { $fileName = $reactionType->reactionTypeID . '-' . $file->getFilename(); - if (file_exists(WCF_DIR . '/images/reaction/' . $fileName)) { - $fileName = $reactionType->reactionTypeID . '-'. substr(0, 5, StringUtil::getRandomID()) . '-' . $file->getFilename(); - } - rename($file->getLocation(), WCF_DIR . '/images/reaction/' . $fileName); $file->setProcessed(WCF_DIR . '/images/reaction/' . $fileName); -- 2.20.1