Ignoring optionals if already installed
authorAlexander Ebert <ebert@woltlab.com>
Wed, 2 Jan 2013 18:04:43 +0000 (19:04 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 2 Jan 2013 18:04:43 +0000 (19:04 +0100)
Fixes #1065

wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php

index 80c06064039fc8b15d829f21bd0670eab76a626f..63da8f322631efca18b5496c8f1e3ca1820f7952 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 namespace wcf\system\package;
+use wcf\data\package\Package;
+
 use wcf\data\package\installation\queue\PackageInstallationQueueEditor;
 use wcf\data\package\installation\queue\PackageInstallationQueueList;
 use wcf\system\exception\SystemException;
@@ -528,6 +530,11 @@ class PackageInstallationNodeBuilder {
                
                $optionalPackages = $this->installation->getArchive()->getOptionals();
                foreach ($optionalPackages as $package) {
+                       // check if already installed
+                       if (Package::isAlreadyInstalled($package['name'])) {
+                               continue;
+                       }
+                       
                        // extract package
                        $index = $this->installation->getArchive()->getTar()->getIndexByFilename($package['file']);
                        if ($index === false) {