Fix the tracking of attachment downloads
authorAlexander Ebert <ebert@woltlab.com>
Thu, 15 Aug 2024 11:25:09 +0000 (13:25 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 15 Aug 2024 11:25:09 +0000 (13:25 +0200)
wcfsetup/install/files/lib/system/file/processor/AttachmentFileProcessor.class.php

index 6de38a51aee0432f3414afde6c7eaddf199cd602..bfc054b3dc6b2dbd985db0c4874e83088b19e47a 100644 (file)
@@ -241,7 +241,7 @@ final class AttachmentFileProcessor extends AbstractFileProcessor
         }
 
         (new AttachmentEditor($attachment))->update([
-            'downloads' => $attachment->downloads,
+            'downloads' => $attachment->downloads + 1,
             'lastDownloadTime' => \TIME_NOW,
         ]);
     }