Browse Source

bump webapps versions and show a error message on missing webapp installers

Robert Zollner 6 years ago
parent
commit
33dc7bac8e

+ 14 - 10
web/add/webapp/index.php

@@ -47,17 +47,21 @@ $v_web_apps = [
 if (!empty($_GET['app'])) {
 if (!empty($_GET['app'])) {
     $app = basename($_GET['app']);
     $app = basename($_GET['app']);
     
     
-    try {
-        $hestia = new \Hestia\System\HestiaApp();
-        $app_installer_class = '\Hestia\WebApp\Installers\\' . $app . 'Setup';
-        $app_installer = new $app_installer_class($v_domain, $hestia);
-        $installer = new \Hestia\WebApp\AppWizard($app_installer, $v_domain, $hestia);
-    } catch (Exception $e) {
-        $_SESSION['error_msg'] = $e->getMessage();
-        header('Location: /add/webapp/?domain=' . $v_domain);
-        exit();
+    $hestia = new \Hestia\System\HestiaApp();
+    $app_installer_class = '\Hestia\WebApp\Installers\\' . $app . 'Setup';
+    if(class_exists($app_installer_class)) {
+        try {
+            $app_installer = new $app_installer_class($v_domain, $hestia);
+            $installer = new \Hestia\WebApp\AppWizard($app_installer, $v_domain, $hestia);
+            $GLOBALS['WebappInstaller'] = $installer;
+        } catch (Exception $e) {
+            $_SESSION['error_msg'] = $e->getMessage();
+            header('Location: /add/webapp/?domain=' . $v_domain);
+            exit();
+        }
+    } else {
+        $_SESSION['error_msg'] = "${app} installer missing";
     }
     }
-    $GLOBALS['WebappInstaller'] = $installer;
 }
 }
 
 
 // Check POST request
 // Check POST request

+ 1 - 1
web/src/app/WebApp/Installers/PrestashopSetup.php

@@ -16,7 +16,7 @@ class PrestashopSetup extends BaseSetup {
             ],
             ],
         'database' => true,
         'database' => true,
         'resources' => [
         'resources' => [
-            'archive'  => [ 'src' => 'https://github.com/PrestaShop/PrestaShop/releases/download/1.7.6.0/prestashop_1.7.6.0.zip' ],
+            'archive'  => [ 'src' => 'https://github.com/PrestaShop/PrestaShop/releases/download/1.7.6.1/prestashop_1.7.6.1.zip' ],
         ],
         ],
 
 
     ];
     ];

+ 1 - 1
web/src/app/WebApp/Installers/WordpressSetup.php

@@ -21,7 +21,7 @@ class WordpressSetup extends BaseSetup {
             ],
             ],
         'database' => true,
         'database' => true,
         'resources' => [
         'resources' => [
-            'archive'  => [ 'src' => 'https://wordpress.org/wordpress-5.2.2.tar.gz' ],
+            'archive'  => [ 'src' => 'https://wordpress.org/wordpress-5.2.4.tar.gz' ],
         ],
         ],
         
         
     ];
     ];