Resolved two issues
authorAlexander Ebert <ebert@woltlab.com>
Tue, 23 Apr 2019 08:31:43 +0000 (10:31 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 23 Apr 2019 08:31:43 +0000 (10:31 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Package/PrepareInstallation.js
wcfsetup/install/files/lib/data/package/update/PackageUpdateAction.class.php

index 824ffa8259f43818416a6194689a8734952fe45e..23ea532bda10d9a16370a2c45c31f2de4359f4d4 100644 (file)
@@ -73,7 +73,9 @@ define(['Ajax', 'Core', 'Language', 'Ui/Dialog'], function(Ajax, Core, Language,
                
                _ajaxSuccess: function(data) {
                        if (data.returnValues.queueID) {
-                               UiDialog.close(this);
+                               if (UiDialog.isOpen(this)) {
+                                       UiDialog.close(this);
+                               }
                                
                                var installation = new window.WCF.ACP.Package.Installation(data.returnValues.queueID, undefined, false);
                                installation.prepareInstallation();
index 7af9a557bc8fd9521ca215cd7635a2e883ea0421..931322ef4ac7ce4d00309a0caf8fd758dec6bde8 100644 (file)
@@ -67,7 +67,10 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction {
                
                // there are no available package update servers
                if (empty($availableUpdateServers)) {
-                       WCF::getTPL()->assign(['packageUpdates' => []]);
+                       WCF::getTPL()->assign([
+                               'thirdPartySources' => [],
+                               'trustedSources' => [],
+                       ]);
                        
                        return ['count' => 0, 'pageCount' => 0, 'searchID' => 0, 'template' => WCF::getTPL()->fetch('packageSearchResultList')];
                }
@@ -94,7 +97,10 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction {
                
                // no matches found
                if (empty($packageUpdateIDs)) {
-                       WCF::getTPL()->assign(['packageUpdates' => []]);
+                       WCF::getTPL()->assign([
+                               'thirdPartySources' => [],
+                               'trustedSources' => [],
+                       ]);
                        
                        return ['count' => 0, 'pageCount' => 0, 'searchID' => 0, 'template' => WCF::getTPL()->fetch('packageSearchResultList')];
                }
@@ -129,7 +135,10 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction {
                
                // no matches found
                if (empty($packageUpdates)) {
-                       WCF::getTPL()->assign(['packageUpdates' => []]);
+                       WCF::getTPL()->assign([
+                               'thirdPartySources' => [],
+                               'trustedSources' => [],
+                       ]);
                        
                        return ['count' => 0, 'pageCount' => 0, 'searchID' => 0, 'template' => WCF::getTPL()->fetch('packageSearchResultList')];
                }