Fixed packageDir detection for applications
authorAlexander Ebert <ebert@woltlab.com>
Thu, 23 Feb 2012 22:12:53 +0000 (23:12 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 23 Feb 2012 22:12:53 +0000 (23:12 +0100)
wcfsetup/install/files/lib/system/form/FormDocument.class.php
wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php

index 7976f3d2f18ffc48a2c3ebfbe5ab0019bc9ce54a..3736c8c7a4c5912f7413e84d5d24733a1584e8a1 100644 (file)
@@ -130,8 +130,8 @@ class FormDocument {
         * @param unknown_type $error
         */
        public function setError($name, $error) {
-               foreach ($this->container as $container) {
-                       $this->containers->setError($name, $error);
+               foreach ($this->containers as $container) {
+                       $container->setError($name, $error);
                }
        }
 }
index 9183ee8348817fed18d4b190dc795ce306e00e0d..c7253a7e71307491d2b0e231c03d8ac5cf821f88 100644 (file)
@@ -457,9 +457,9 @@ class PackageInstallationDispatcher {
                        
                        if ($packageDir !== null) {
                                // validate package dir
-                               if (file_exists(FileUtil::addLeadingSlash($packageDir) . 'global.php')) {
+                               if (file_exists(FileUtil::addTrailingSlash($packageDir) . 'global.php')) {
                                        $document->setError('packageDir', WCF::getLanguage()->get('wcf.acp.package.packageDir.notAvailable'));
-                                       return null;
+                                       return $document;
                                }
                                
                                // set package dir