|
|
@@ -30,24 +30,12 @@ if(!in_array($v_domain, $user_domains)) {
|
|
|
exit;
|
|
|
}
|
|
|
|
|
|
-$v_web_apps = [
|
|
|
- [ 'name'=>'Wordpress', 'group'=>'cms', 'enabled'=>true, 'version'=>'latest', 'thumbnail'=>'/images/webapps/wp-thumb.png' ],
|
|
|
- [ 'name'=>'Drupal', 'group'=>'cms', 'enabled'=>false,'version'=>'latest', 'thumbnail'=>'/images/webapps/drupal-thumb.png' ],
|
|
|
- [ 'name'=>'Joomla', 'group'=>'cms', 'enabled'=>false,'version'=>'latest', 'thumbnail'=>'/images/webapps/joomla-thumb.png' ],
|
|
|
-
|
|
|
- [ 'name'=>'Opencart', 'group'=>'ecommerce', 'enabled'=>true, 'version'=>'3.0.3.3', 'thumbnail'=>'/images/webapps/opencart-thumb.png' ],
|
|
|
- [ 'name'=>'Prestashop', 'group'=>'ecommerce', 'enabled'=>true, 'version'=>'1.7.7.1', 'thumbnail'=>'/images/webapps/prestashop-thumb.png' ],
|
|
|
-
|
|
|
- [ 'name'=>'Laravel', 'group'=>'starter', 'enabled'=>true, 'version'=>'7.x', 'thumbnail'=>'/images/webapps/laravel-thumb.png' ],
|
|
|
- [ 'name'=>'Symfony', 'group'=>'starter', 'enabled'=>true, 'version'=>'4.3.x', 'thumbnail'=>'/images/webapps/symfony-thumb.png' ],
|
|
|
-];
|
|
|
-
|
|
|
// Check GET request
|
|
|
if (!empty($_GET['app'])) {
|
|
|
$app = basename($_GET['app']);
|
|
|
|
|
|
$hestia = new \Hestia\System\HestiaApp();
|
|
|
- $app_installer_class = '\Hestia\WebApp\Installers\\' . $app . 'Setup';
|
|
|
+ $app_installer_class = '\Hestia\WebApp\Installers\\'.$app.'\\' . $app . 'Setup';
|
|
|
if(class_exists($app_installer_class)) {
|
|
|
try {
|
|
|
$app_installer = new $app_installer_class($v_domain, $hestia);
|
|
|
@@ -94,6 +82,19 @@ if (!empty($_POST['ok']) && !empty($app) ) {
|
|
|
if(!empty($installer)) {
|
|
|
render_page($user, $TAB, 'setup_webapp');
|
|
|
} else {
|
|
|
+ $appInstallers = glob(__DIR__.'/../../src/app/WebApp/Installers/*/*.php');
|
|
|
+ $v_web_apps = array();
|
|
|
+ foreach($appInstallers as $app){
|
|
|
+ $hestia = new \Hestia\System\HestiaApp();
|
|
|
+ if( preg_match('/Installers\/([a-zA-Z0-0].*)\/([a-zA-Z0-0].*).php/', $app, $matches)){
|
|
|
+ if ($matches[1] != "Resources"){
|
|
|
+ $app_installer_class = '\Hestia\WebApp\Installers\\'.$matches[1].'\\' . $matches[1] . 'Setup';
|
|
|
+ $app_installer = new $app_installer_class($v_domain, $hestia);
|
|
|
+ $v_web_apps[] = $app_installer -> info();
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
render_page($user, $TAB, 'list_webapps');
|
|
|
}
|
|
|
|