Skip to content

Commit 197a12d

Browse files
committed
fix: Improve wording, styling and error handling of the auto updater
1 parent b025f04 commit 197a12d

File tree

3 files changed

+5
-9
lines changed
  • engine/Shopware/Plugins/Default/Backend/SwagUpdate

3 files changed

+5
-9
lines changed

engine/Shopware/Plugins/Default/Backend/SwagUpdate/Components/Download.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,8 @@ public function downloadFile($sourceUri, $destinationUri, $totalSize, $hash)
169169
$error = curl_error($ch);
170170
curl_close($ch);
171171

172-
if ($isError && !$isHalted) {
173-
throw new Exception('Wrong http code');
174-
}
175-
176-
if ($result === false && !$isHalted) {
177-
throw new Exception($error);
172+
if (($result === false || $isError) && !$isHalted) {
173+
throw new Exception($error ?: 'Unknown error');
178174
}
179175

180176
clearstatcache(false, $partFile->getPathname());

engine/Shopware/Plugins/Default/Backend/SwagUpdate/Snippets/backend/swag_update/main.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ security_update_window/text = "<h2>Warning!</h2>A new security update is availab
7979
security_update_window/cancel = "Close"
8080
security_update_window/update = "Open software update"
8181
ftp/invalid_permissions = "Invalid file permissions"
82-
release_information = "You can access the release information of [1] here."
82+
release_information = "You can see the current release information for [1] here."
8383

8484
[de_DE]
8585
cancel = "Abbrechen"
@@ -162,4 +162,4 @@ security_update_window/text = "<h2>Achtung!</h2>Ein neues Sicherheitsupdate ist
162162
security_update_window/cancel = "Schließen"
163163
security_update_window/update = "Softwareaktualisierung öffnen"
164164
ftp/invalid_permissions = "Invalide Datei Rechte"
165-
release_information = "Du kannst die aktuellen release Information von [1] hier beziehen."
165+
release_information = "Du kannst die aktuellen Release-Informationen zu [1] hier einsehen."

engine/Shopware/Plugins/Default/Backend/SwagUpdate/Views/backend/swag_update/view/window.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Ext.define('Shopware.apps.SwagUpdate.view.Window', {
180180
var me = this;
181181

182182
var text = Ext.String.format(
183-
'<div class="swag-update-changelog"><a href="[0]">{s name="release_information"}You can access the release information of [1] here.{/s}</a></div>',
183+
'<div class="swag-update-changelog"><br><a href="[0]">{s name="release_information"}{/s}</a></div>',
184184
me.changelog.get('changelog'),
185185
me.changelog.get('version')
186186
);

0 commit comments

Comments
 (0)