From f5ad23731548bdf82045e81fdb92b27ba2d3f683 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 15 Nov 2011 17:34:26 +0100 Subject: [PATCH] Changed progress calculation In previous version of WCF, the progress was calculated upon a known amount of steps. This is no longer valid and the calculation within the real ACP-based installation is independent. Since the WCFSetup itself is not performing the installation itself, this behavior was changed to reflect the preparation progress. --- .../install/files/lib/system/WCFSetup.class.php | 15 +-------------- wcfsetup/setup/lang/setup_de.xml | 2 +- wcfsetup/setup/lang/setup_en.xml | 2 +- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php index fa11a69eba..8b9593cd41 100644 --- a/wcfsetup/install/files/lib/system/WCFSetup.class.php +++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php @@ -196,21 +196,8 @@ class WCFSetup extends WCF { * @param integer $currentStep */ protected function calcProgress($currentStep) { - // count delivered packages - $packages = 1; // one for wcf setup - $tar = new Tar(SETUP_FILE); - foreach ($tar->getContentList() as $file) { - if ($file['type'] != 'folder' && StringUtil::indexOf($file['filename'], 'install/packages/') === 0) { - $packages++; - } - } - $tar->close(); - - // calculate part of total install - $part = 100 / $packages; - // calculate progress - $progress = round($part / 11 * $currentStep, 0); + $progress = round((100 / 12) * ++$currentStep, 0); self::getTPL()->assign(array('progress' => $progress)); } diff --git a/wcfsetup/setup/lang/setup_de.xml b/wcfsetup/setup/lang/setup_de.xml index 5d85ed2f85..c7bba6e7b0 100644 --- a/wcfsetup/setup/lang/setup_de.xml +++ b/wcfsetup/setup/lang/setup_de.xml @@ -3,7 +3,7 @@ - + diff --git a/wcfsetup/setup/lang/setup_en.xml b/wcfsetup/setup/lang/setup_en.xml index 3515091fa7..4a9bc731bc 100644 --- a/wcfsetup/setup/lang/setup_en.xml +++ b/wcfsetup/setup/lang/setup_en.xml @@ -3,7 +3,7 @@ - + -- 2.20.1