From: Alexander Ebert Date: Fri, 4 Nov 2011 21:28:58 +0000 (+0100) Subject: Nodes for child queues are now built X-Git-Tag: 2.0.0_Beta_1~1616^2~13 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8d84809fbbcd09daa1e85898811ee227503966e6;p=GitHub%2FWoltLab%2FWCF.git Nodes for child queues are now built --- 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. *