Fixed package installation via update servers
authorAlexander Ebert <ebert@woltlab.com>
Mon, 24 Jun 2013 19:40:30 +0000 (21:40 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 24 Jun 2013 19:40:30 +0000 (21:40 +0200)
wcfsetup/install/files/acp/js/WCF.ACP.js
wcfsetup/install/files/lib/data/package/update/PackageUpdateAction.class.php

index c1ac6408a8496056dab2dd497c06bcb436923d74..ed2a30cf6467a559ea2575c5a3e78cd93917465d 100644 (file)
@@ -1123,9 +1123,9 @@ WCF.ACP.Package.Search = Class.extend({
         */
        _prepareInstallation: function(packageUpdateServerID) {
                var $parameters = {
-                       'package': { }
+                       'packages': { }
                };
-               $parameters['package'][this._selectedPackage] = this._selectedPackageVersion;
+               $parameters['packages'][this._selectedPackage] = this._selectedPackageVersion;
                
                if (packageUpdateServerID) {
                        $parameters.authData = {
index ba0dfe65a466dffcaf971a2c0c8dd818bc3c5ef8..f6a00163c4db33dca1103e1e6d2f7d758f593425 100644 (file)
@@ -348,7 +348,9 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction {
        public function validatePrepareInstallation() {
                WCF::getSession()->checkPermissions(array('admin.system.package.canInstallPackage'));
                
-               $this->readString('package');
+               if (!isset($this->parameters['packages']) || !is_array($this->parameters['packages']) || count($this->parameters['packages']) != 1) {
+                       throw new UserInputException('packages');
+               }
                
                if (isset($this->parameters['authData'])) {
                        if (!is_array($this->parameters['authData'])) {