Fixed child queue handling
authorAlexander Ebert <ebert@woltlab.com>
Sat, 5 Nov 2011 02:00:13 +0000 (03:00 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 5 Nov 2011 02:00:13 +0000 (03:00 +0100)
wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php

index 954dfdb96bbb3bcf525a5784743e7cc187ad430a..939d4f6e2f5cb28c65ac77fcea4af0a835785c6a 100644 (file)
@@ -3,6 +3,7 @@ namespace wcf\system\package;
 use wcf\data\package\installation\queue\PackageInstallationQueue;
 use wcf\data\package\installation\queue\PackageInstallationQueueEditor;
 use wcf\data\package\installation\queue\PackageInstallationQueueList;
+use wcf\system\exception\SystemException;
 use wcf\system\Callback;
 use wcf\system\WCF;
 use wcf\util\FileUtil;
@@ -404,6 +405,11 @@ class PackageInstallationNodeBuilder {
                        // extract package
                        $index = $this->installation->getArchive()->getTar()->getIndexByFilename($package['file']);
                        if ($index === false) {
+                               // workaround for WCFSetup
+                               if (!PACKAGE_ID && $packageName == 'com.woltlab.wcf') {
+                                       continue;
+                               }
+                               
                                throw new SystemException("Unable to find required package '".$package['file']."' within archive.");
                        }
                        
@@ -554,7 +560,9 @@ class PackageInstallationNodeBuilder {
         */
        protected function buildChildQueues() {
                $queueList = new PackageInstallationQueueList();
+               $queueList->sqlJoins = "LEFT JOIN wcf".WCF_N."_package_installation_node package_installation_node ON (package_installation_node.queueID = package_installation_queue.queueID)";
                $queueList->getConditionBuilder()->add("package_installation_queue.parentQueueID = ?", array($this->installation->queue->queueID));
+               $queueList->getConditionBuilder()->add("package_installation_node.node IS NOT NULL");
                $queueList->sqlLimit = 0;
                $queueList->readObjects();