From 7ddf2af9528be4c114d4ad83b804c3529769f24c Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 20 Apr 2014 17:53:57 +0200 Subject: [PATCH] Improved package update --- .../PackageInstallationNodeBuilder.class.php | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php index bab11e22b4..59391c9064 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php @@ -87,8 +87,13 @@ class PackageInstallationNodeBuilder { // required packages $this->buildRequirementNodes(); + // register package version + self::$pendingPackages[$this->installation->getArchive()->getPackageInfo('name')] = $this->installation->getArchive()->getPackageInfo('version'); + // install package itself - $this->buildPackageNode(); + if ($this->installation->queue->action == 'install') { + $this->buildPackageNode(); + } // package installation plugins $this->buildPluginNodes(); @@ -100,6 +105,10 @@ class PackageInstallationNodeBuilder { // child queues $this->buildChildQueues(); + + if ($this->installation->queue->action == 'update') { + $this->buildPackageNode(); + } } /** @@ -421,8 +430,6 @@ class PackageInstallationNodeBuilder { 'requirements' => $this->requirements )) )); - - self::$pendingPackages[$this->installation->getArchive()->getPackageInfo('name')] = $this->installation->getArchive()->getPackageInfo('version'); } /** @@ -548,6 +555,13 @@ class PackageInstallationNodeBuilder { * @return string */ protected function buildPluginNodes() { + if (!empty($this->node)) { + $this->parentNode = $this->node; + $this->sequenceNo = 0; + } + + $this->node = $this->getToken(); + $pluginNodes = array(); $this->emptyNode = true; -- 2.20.1