It Was only necessary for testing
authorCyperghost <olaf_schmitz_1@t-online.de>
Thu, 13 Jun 2024 09:26:59 +0000 (11:26 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Thu, 13 Jun 2024 09:26:59 +0000 (11:26 +0200)
ts/WoltLabSuite/Core/Component/File/Upload.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Component/File/Upload.js

index d2a063fa0caf863a8d00f3c88cacf44abd6b71c1..0f88d2337619569def20140cb45151148007baff 100644 (file)
@@ -180,8 +180,6 @@ function validateFileLimit(element: WoltlabCoreFileUploadElement): boolean {
   const maximumCount = element.maximumCount;
   if (maximumCount === -1) {
     return true;
-  } else if (maximumCount > 0) {
-    return true;
   }
 
   const files = Array.from(element.parentElement!.querySelectorAll("woltlab-core-file"));
index 8da54d339b5bfb1dac1b3f06b1113cac6b4400aa..06612c3e339b5180dce289268c60cd687db6da96 100644 (file)
@@ -111,9 +111,6 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Helper/Selector", "Wol
         if (maximumCount === -1) {
             return true;
         }
-        else if (maximumCount > 0) {
-            return true;
-        }
         const files = Array.from(element.parentElement.querySelectorAll("woltlab-core-file"));
         const numberOfUploadedFiles = files.filter((file) => !file.isFailedUpload()).length;
         if (numberOfUploadedFiles + 1 <= maximumCount) {