From 36ec55938381d65d74d6cbe1929fa21af5539886 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 29 Sep 2013 19:10:25 +0200 Subject: [PATCH] Fixed a few issues during update --- com.woltlab.wcf/package.xml | 2 +- com.woltlab.wcf/update_b10.sql | 1 - .../PackageInstallationNodeBuilder.class.php | 18 ++++++++++++------ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/com.woltlab.wcf/package.xml b/com.woltlab.wcf/package.xml index a71cb492ea..0b9e62e441 100644 --- a/com.woltlab.wcf/package.xml +++ b/com.woltlab.wcf/package.xml @@ -50,8 +50,8 @@ acptemplates_update.tar templates_update.tar language/*.xml - option.xml update_b10.sql + option.xml diff --git a/com.woltlab.wcf/update_b10.sql b/com.woltlab.wcf/update_b10.sql index 5a84f0863a..4e89d66f9e 100644 --- a/com.woltlab.wcf/update_b10.sql +++ b/com.woltlab.wcf/update_b10.sql @@ -4,7 +4,6 @@ DELETE FROM wcf1_user_storage; ALTER TABLE wcf1_user_storage CHANGE fieldValue fieldValue MEDIUMTEXT; /* ec09840 */ -DROP TABLE IF EXISTS wcf1_cli_history; CREATE TABLE wcf1_cli_history ( historyItem INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY, userID INT(10) NOT NULL, diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php index 97ead88622..492262a843 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php @@ -552,7 +552,11 @@ class PackageInstallationNodeBuilder { $this->emptyNode = true; $instructions = ($this->installation->getAction() == 'install') ? $this->installation->getArchive()->getInstallInstructions() : $this->installation->getArchive()->getUpdateInstructions(); + $count = count($instructions); + $i = 0; foreach ($instructions as $pip) { + $i++; + if (isset($pip['attributes']['run']) && ($pip['attributes']['run'] == 'standalone')) { // move into a new node unless current one is empty if (!$this->emptyNode) { @@ -567,12 +571,14 @@ class PackageInstallationNodeBuilder { 'sequenceNo' => $this->sequenceNo ); - // create a new node for following PIPs - $this->parentNode = $this->node; - $this->node = $this->getToken(); - $this->sequenceNo = 0; - - $this->emptyNode = true; + // create a new node for following PIPs, unless it is the last one + if ($i < $count) { + $this->parentNode = $this->node; + $this->node = $this->getToken(); + $this->sequenceNo = 0; + + $this->emptyNode = true; + } } else { $this->sequenceNo++; -- 2.20.1