Skip to content

Commit 632b416

Browse files
committed
Show error message when web app is disabled
1 parent d711f96 commit 632b416

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

web/add/webapp/index.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,13 @@
3939
if(class_exists($app_installer_class)) {
4040
try {
4141
$app_installer = new $app_installer_class($v_domain, $hestia);
42-
$installer = new \Hestia\WebApp\AppWizard($app_installer, $v_domain, $hestia);
43-
$GLOBALS['WebappInstaller'] = $installer;
42+
$info = $app_installer -> info();
43+
if ($info['enabled'] != true){
44+
$_SESSION['error_msg'] = sprintf(_('%s installer missing'),$app);
45+
}else{
46+
$installer = new \Hestia\WebApp\AppWizard($app_installer, $v_domain, $hestia);
47+
$GLOBALS['WebappInstaller'] = $installer;
48+
}
4449
} catch (Exception $e) {
4550
$_SESSION['error_msg'] = $e->getMessage();
4651
header('Location: /add/webapp/?domain=' . $v_domain);

0 commit comments

Comments
 (0)