From 8d84809fbbcd09daa1e85898811ee227503966e6 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 4 Nov 2011 22:28:58 +0100 Subject: [PATCH] Nodes for child queues are now built --- .../PackageInstallationNodeBuilder.class.php | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php index 7e2e8066ed..48f30a9fe9 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php @@ -2,6 +2,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\Callback; use wcf\system\WCF; use wcf\util\FileUtil; @@ -79,6 +80,9 @@ class PackageInstallationNodeBuilder { // optional packages $this->buildOptionalNodes(); + + // child queues + $this->buildChildQueues(); } /** @@ -544,6 +548,23 @@ class PackageInstallationNodeBuilder { } } + /** + * Recursively build nodes for child queues. + */ + protected function buildChildQueues() { + $queueList = new PackageInstallationQueueList(); + $queueList->getConditionBuilder->add("package_installation_queue.parentQueueID = ?", array($this->installation->queue->queueID)); + $queueList->sqlLimit = 0; + $queueList->readObjects(); + + foreach ($queueList as $queue) { + $installation = new PackageInstallationDispatcher($queue); + $installation->nodeBuilder->setParentNode($this->node); + $installation->nodeBuilder->buildNodes(); + $this->node = $installation->nodeBuilder->getCurrentNode(); + } + } + /** * Returns a short SHA1-hash. * -- 2.20.1