Skip to content

Commit 33dc7ba

Browse files
committed
bump webapps versions and show a error message on missing webapp installers
1 parent 3a47dd7 commit 33dc7ba

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

web/add/webapp/index.php

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,21 @@
4747
if (!empty($_GET['app'])) {
4848
$app = basename($_GET['app']);
4949

50-
try {
51-
$hestia = new \Hestia\System\HestiaApp();
52-
$app_installer_class = '\Hestia\WebApp\Installers\\' . $app . 'Setup';
53-
$app_installer = new $app_installer_class($v_domain, $hestia);
54-
$installer = new \Hestia\WebApp\AppWizard($app_installer, $v_domain, $hestia);
55-
} catch (Exception $e) {
56-
$_SESSION['error_msg'] = $e->getMessage();
57-
header('Location: /add/webapp/?domain=' . $v_domain);
58-
exit();
50+
$hestia = new \Hestia\System\HestiaApp();
51+
$app_installer_class = '\Hestia\WebApp\Installers\\' . $app . 'Setup';
52+
if(class_exists($app_installer_class)) {
53+
try {
54+
$app_installer = new $app_installer_class($v_domain, $hestia);
55+
$installer = new \Hestia\WebApp\AppWizard($app_installer, $v_domain, $hestia);
56+
$GLOBALS['WebappInstaller'] = $installer;
57+
} catch (Exception $e) {
58+
$_SESSION['error_msg'] = $e->getMessage();
59+
header('Location: /add/webapp/?domain=' . $v_domain);
60+
exit();
61+
}
62+
} else {
63+
$_SESSION['error_msg'] = "${app} installer missing";
5964
}
60-
$GLOBALS['WebappInstaller'] = $installer;
6165
}
6266

6367
// Check POST request

web/src/app/WebApp/Installers/PrestashopSetup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class PrestashopSetup extends BaseSetup {
1616
],
1717
'database' => true,
1818
'resources' => [
19-
'archive' => [ 'src' => 'https://github.com/PrestaShop/PrestaShop/releases/download/1.7.6.0/prestashop_1.7.6.0.zip' ],
19+
'archive' => [ 'src' => 'https://github.com/PrestaShop/PrestaShop/releases/download/1.7.6.1/prestashop_1.7.6.1.zip' ],
2020
],
2121

2222
];

web/src/app/WebApp/Installers/WordpressSetup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class WordpressSetup extends BaseSetup {
2121
],
2222
'database' => true,
2323
'resources' => [
24-
'archive' => [ 'src' => 'https://wordpress.org/wordpress-5.2.2.tar.gz' ],
24+
'archive' => [ 'src' => 'https://wordpress.org/wordpress-5.2.4.tar.gz' ],
2525
],
2626

2727
];

0 commit comments

Comments
 (0)