From: Alexander Ebert Date: Tue, 15 Nov 2011 16:34:26 +0000 (+0100) Subject: Changed progress calculation X-Git-Tag: 2.0.0_Beta_1~1591^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f5ad23731548bdf82045e81fdb92b27ba2d3f683;p=GitHub%2FWoltLab%2FWCF.git 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. --- 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 @@ - +