Ver Fonte

Show error message when web app is disabled

Jaap Marcus há 5 anos atrás
pai
commit
632b41679e
1 ficheiros alterados com 7 adições e 2 exclusões
  1. 7 2
      web/add/webapp/index.php

+ 7 - 2
web/add/webapp/index.php

@@ -39,8 +39,13 @@ if (!empty($_GET['app'])) {
     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;
+            $info = $app_installer -> info();
+            if ($info['enabled'] != true){
+                $_SESSION['error_msg'] = sprintf(_('%s installer missing'),$app);
+            }else{
+                $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);