Improved package installation
authorAlexander Ebert <ebert@woltlab.com>
Wed, 17 Jul 2013 19:30:03 +0000 (21:30 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 17 Jul 2013 19:30:03 +0000 (21:30 +0200)
wcfsetup/install/files/acp/templates/packageInstallationConfirm.tpl
wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php
wcfsetup/install/files/lib/data/package/installation/queue/PackageInstallationQueueAction.class.php
wcfsetup/setup/db/install.sql

index 4e52dbba092f07674bd803f390439be8768212c4..af2d094cd42882aa9d31ec22de9b41631cebaeed 100644 (file)
@@ -11,7 +11,7 @@
                        'wcf.acp.package.update.title': '{lang}wcf.acp.package.update.title{/lang}'
                });
                
-               new WCF.ACP.Package.Installation({@$queue->queueID}, undefined, {if $queue->action == 'install'}true, false{else}false, true{/if});
+               new WCF.ACP.Package.Installation({@$queue->queueID}, undefined, {if $queue->action == 'install'}{if $queue->isApplication}false{else}true{/if}, false{else}false, true{/if});
                
                new WCF.ACP.Package.Installation.Cancel({@$queue->queueID});
        });
index 5a0f561f70f489934eb1f48436bc7006f8c8dbdb..979c1ac95df13b6d5bc314cd37b1fbc499b47413 100755 (executable)
@@ -207,6 +207,7 @@ class PackageStartInstallForm extends AbstractForm {
                $packageID = ($this->package) ? $this->package->packageID : null;
                
                // insert queue
+               $isApplication = $this->archive->getPackageInfo('isApplication');
                $this->queue = PackageInstallationQueueEditor::create(array(
                        'processNo' => $processNo,
                        'userID' => WCF::getUser()->userID,
@@ -215,7 +216,7 @@ class PackageStartInstallForm extends AbstractForm {
                        'packageID' => $packageID,
                        'archive' => (!empty($this->uploadPackage['tmp_name']) ? $this->uploadPackage['name'] : $this->downloadPackage),
                        'action' => ($this->package != null ? 'update' : 'install'),
-                       'confirmInstallation' => 1
+                       'isApplication' => (!$isApplication ? '0' : '1')
                ));
                
                $this->saved();
index d0ebe56c869e0ce3e2210f0806ab60b048325f43..b8c88122a1ef4b33746fe8fc36efba2d17d15433 100644 (file)
@@ -87,10 +87,6 @@ class PackageInstallationQueueAction extends AbstractDatabaseObjectAction {
                        throw new UserInputException('objectIDs');
                }
                
-               // todo: do confirmInstallation and packageType need validation?
-               // see https://github.com/WoltLab/WCF/issues/1329
-               // see https://github.com/WoltLab/WCF/issues/1330
-               
                if ($this->queue->userID != WCF::getUser()->userID) {
                        throw new PermissionDeniedException();
                }
index c0d9b2e193c0616ccc52c163a10d948526415257..b05613c40cf1bee05c795a648db3c6711810df5b 100644 (file)
@@ -603,8 +603,7 @@ CREATE TABLE wcf1_package_installation_queue (
        archive VARCHAR(255) NOT NULL DEFAULT '',
        action ENUM('install', 'update', 'uninstall') NOT NULL DEFAULT 'install',
        done TINYINT(1) NOT NULL DEFAULT 0,
-       confirmInstallation TINYINT(1) NOT NULL DEFAULT 0,
-       packageType ENUM('default', 'requirement', 'optional') NOT NULL DEFAULT 'default'
+       isApplication TINYINT(1) NOT NULL DEFAULT 0
 );
 
 DROP TABLE IF EXISTS wcf1_package_installation_sql_log;