Fixed a few issues preventing an update
authorAlexander Ebert <ebert@woltlab.com>
Fri, 19 Jul 2013 12:01:55 +0000 (14:01 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 19 Jul 2013 12:01:55 +0000 (14:01 +0200)
com.woltlab.wcf/files_pre_update.tar [new file with mode: 0644]
com.woltlab.wcf/package.xml
wcfsetup/install/files/lib/acp/page/PackageInstallationConfirmPage.class.php
wcfsetup/install/files/lib/system/exception/SystemException.class.php
wcfsetup/install/files/lib/system/setup/Installer.class.php
wcfsetup/install/files/lib/util/FileUtil.class.php

diff --git a/com.woltlab.wcf/files_pre_update.tar b/com.woltlab.wcf/files_pre_update.tar
new file mode 100644 (file)
index 0000000..94db5fb
Binary files /dev/null and b/com.woltlab.wcf/files_pre_update.tar differ
index 368034bd1d0004b05bc8279a4806565c4a8f4bd1..98966e3262d1207ba759efe8d1622d3a285e1c32 100644 (file)
@@ -43,6 +43,8 @@
        </instructions>
        
        <instructions type="update" fromversion="2.0.0 Beta 4">
+               <instruction type="file" run="standalone">files_pre_update.tar</instruction>
+               
                <instruction type="file">files_update.tar</instruction>
                <instruction type="acpTemplate">acptemplates_update.tar</instruction>
                <instruction type="language">language/*.xml</instruction>
index 40129f9c983ac7446357a903ff5e5c6e5eac2e15..06be9a978c093fb1c9ef5bb0cca12648dab39f00 100644 (file)
@@ -114,6 +114,7 @@ class PackageInstallationConfirmPage extends AbstractPage {
                        
                        $requirement['package'] = PackageCache::getInstance()->getPackageByIdentifier($requirement['name']);
                }
+               
                unset($requirement);
        }
        
index 831e27f6f27ea02a715ea417826c228e69d5de59..15229827b7edd686b3b5b1476350c45f2b5b1eb7 100644 (file)
@@ -150,7 +150,7 @@ class SystemException extends LoggedException implements IPrintableException {
                                        
                                        <?php if (WCF::debugModeIsEnabled()) { ?>
                                                <div>
-                                                       <p><?php echo $this->getDescription(); ?></p>
+                                                       <?php if ($this->getDescription()) { ?><p><br /><?php echo $this->getDescription(); ?></p><?php } ?>
                                                        
                                                        <h2>Information:</h2>
                                                        <p>
index 6f9b6ba5278f803e1a155c70bd2ee4f95274fdf6..70ebd36834d4914a9fb68fd10a6ae765cf24a1a6 100644 (file)
@@ -152,7 +152,7 @@ class Installer {
                                $this->createDir($dir);
                        }
                        catch (SystemException $e) {
-                               $errors[] = array('file' => $dir, 'code' => $e->getCode(), 'message' => $e->getMessage());
+                               $errors[] = $e->getMessage();
                        }
                }
                
@@ -162,11 +162,11 @@ class Installer {
                                $this->createFile($file, $index, $tar);
                        }
                        catch (SystemException $e) {
-                               $errors[] = array('file' => $file, 'code' => $e->getCode(), 'message' => $e->getMessage());
+                               $errors[] = $e->getMessage();
                        }
                }
                if (!empty($errors)) {
-                       throw new SystemException('error(s) during the installation of the files.', $errors);
+                       throw new SystemException('error(s) during the installation of the files.', 0, implode("<br />", $errors));
                }
                
                $this->logFiles($files);
index e0e69618fe68f09c9e4752f74fdca499d571ab9f..d070d2fa3600ac58e76c44ad6e799d821728bf76 100644 (file)
@@ -234,6 +234,14 @@ final class FileUtil {
                return $path;
        }
        
+       /**
+        * @todo        Work-around for update, remove this after 2.0.0 Beta 5
+        * @deprecated
+        */
+       public static function unifyDirSeperator($path) {
+               return self::unifyDirSeparator($path);
+       }
+       
        /**
         * Scans a folder (and subfolder) for a specific file.
         * Returns the filename if found, otherwise false.