Remove superfluous exists check
authorJoshua Rüsweg <josh@bastelstu.be>
Thu, 31 Jan 2019 14:34:33 +0000 (15:34 +0100)
committerJoshua Rüsweg <josh@bastelstu.be>
Thu, 31 Jan 2019 14:34:33 +0000 (15:34 +0100)
See #2825

wcfsetup/install/files/lib/acp/form/ReactionTypeAddForm.class.php

index 7b3baa7a00f37372d5573d5cf91c9826560ea308..d210544ac35b55de3d38c184e140136c911fe059 100644 (file)
@@ -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);