Changed progress calculation
authorAlexander Ebert <ebert@woltlab.com>
Tue, 15 Nov 2011 16:34:26 +0000 (17:34 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 15 Nov 2011 16:34:26 +0000 (17:34 +0100)
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.

wcfsetup/install/files/lib/system/WCFSetup.class.php
wcfsetup/setup/lang/setup_de.xml
wcfsetup/setup/lang/setup_en.xml

index fa11a69ebae8ae722acce93ce336c4aab988f87c..8b9593cd41824352c4505056bed01ede67f1eed4 100644 (file)
@@ -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));
        }
        
index 5d85ed2f855e2d2a73226eadc72890ff30390e7e..c7bba6e7b0e830d3d51fd3839358b1710dfd50a3 100644 (file)
@@ -3,7 +3,7 @@
        <category name="wcf.global">
                <item name="wcf.global.pageTitle"><![CDATA[{$setupPackageName} Installation]]></item>
                <item name="wcf.global.title"><![CDATA[{$setupPackageName}]]></item>
-               <item name="wcf.global.title.subtitle"><![CDATA[Installation]]></item>
+               <item name="wcf.global.title.subtitle"><![CDATA[Vorbereiten der Installation]]></item>
                <item name="wcf.global.pageDirection"><![CDATA[ltr]]></item>
                <item name="wcf.global.locale.unix"><![CDATA[de_DE]]></item>
                <item name="wcf.global.locale.win"><![CDATA[deu_deu]]></item>
index 3515091fa764fb6bb8eac6e34c50bf6ede9fd760..4a9bc731bc3a3c53a8b0a794c9d52759ed5a37d2 100644 (file)
@@ -3,7 +3,7 @@
        <category name="wcf.global">
                <item name="wcf.global.pageTitle"><![CDATA[{$setupPackageName} installation]]></item>
                <item name="wcf.global.title"><![CDATA[{$setupPackageName}]]></item>
-               <item name="wcf.global.title.subtitle"><![CDATA[Installation]]></item>
+               <item name="wcf.global.title.subtitle"><![CDATA[Prepairing installation]]></item>
                <item name="wcf.global.pageDirection"><![CDATA[ltr]]></item> <!-- system variable; do not translate -->
                <item name="wcf.global.locale.unix"><![CDATA[en_US]]></item> <!-- system variable; do not translate -->
                <item name="wcf.global.locale.win"><![CDATA[english]]></item> <!-- system variable; do not translate -->