Fixed a few issues during update
authorAlexander Ebert <ebert@woltlab.com>
Sun, 29 Sep 2013 17:10:25 +0000 (19:10 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 29 Sep 2013 17:10:25 +0000 (19:10 +0200)
com.woltlab.wcf/package.xml
com.woltlab.wcf/update_b10.sql
wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php

index a71cb492ead083434ba9f0e164eec6d9d587e8f7..0b9e62e441912a81d56f8740097a78a10d0f74ef 100644 (file)
@@ -50,8 +50,8 @@
                <instruction type="acpTemplate">acptemplates_update.tar</instruction>
                <instruction type="template">templates_update.tar</instruction>
                <instruction type="language">language/*.xml</instruction>
-               <instruction type="option">option.xml</instruction>
                
                <instruction type="sql" run="standalone">update_b10.sql</instruction>
+               <instruction type="option">option.xml</instruction>
        </instructions>
 </package>
index 5a84f0863a92299466f39cb53a71f5f0e8483b2f..4e89d66f9e313630c70473423ec97c23d911f526 100644 (file)
@@ -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,
index 97ead886221233e8952a55ca148bf84fac6744e5..492262a843ee4f0b18b35d450dd2716f9623d166 100644 (file)
@@ -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++;