From: Alexander Ebert Date: Sun, 20 Apr 2014 15:53:57 +0000 (+0200) Subject: Improved package update X-Git-Tag: 2.1.0_Alpha_1~870 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7ddf2af9528be4c114d4ad83b804c3529769f24c;p=GitHub%2FWoltLab%2FWCF.git Improved package update --- 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;