Fixes file logging
authorAlexander Ebert <ebert@woltlab.com>
Tue, 21 May 2013 00:18:35 +0000 (02:18 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 21 May 2013 00:18:35 +0000 (02:18 +0200)
wcfsetup/install/files/lib/system/package/FilesFileHandler.class.php

index e2f06546ee8aebd21f865d8308280099ec7575b1..9491d3bde396b895759fb780ce024bd29aaaef47 100644 (file)
@@ -63,7 +63,7 @@ class FilesFileHandler extends PackageInstallationFileHandler {
                
                // insert 50 files per loop
                for ($i = 0, $steps = ceil(count($files) / 50); $i < $steps; $i++) {
-                       $items = array_slice($files, $i, 50);
+                       $items = array_slice($files, $i * 50, 50);
                        $sql = "INSERT IGNORE INTO      wcf".WCF_N."_package_installation_file_log
                                                        (packageID, filename, application)
                                VALUES                  ".substr(str_repeat("(".$this->packageInstallation->getPackageID().", ?, '".$this->application."'), ", count($items)), 0, -2);