|
30 | 30 | exit; |
31 | 31 | } |
32 | 32 |
|
33 | | -$v_web_apps = [ |
34 | | - [ 'name'=>'Wordpress', 'group'=>'cms', 'enabled'=>true, 'version'=>'latest', 'thumbnail'=>'/images/webapps/wp-thumb.png' ], |
35 | | - [ 'name'=>'Drupal', 'group'=>'cms', 'enabled'=>false,'version'=>'latest', 'thumbnail'=>'/images/webapps/drupal-thumb.png' ], |
36 | | - [ 'name'=>'Joomla', 'group'=>'cms', 'enabled'=>false,'version'=>'latest', 'thumbnail'=>'/images/webapps/joomla-thumb.png' ], |
37 | | - |
38 | | - [ 'name'=>'Opencart', 'group'=>'ecommerce', 'enabled'=>true, 'version'=>'3.0.3.3', 'thumbnail'=>'/images/webapps/opencart-thumb.png' ], |
39 | | - [ 'name'=>'Prestashop', 'group'=>'ecommerce', 'enabled'=>true, 'version'=>'1.7.7.1', 'thumbnail'=>'/images/webapps/prestashop-thumb.png' ], |
40 | | - |
41 | | - [ 'name'=>'Laravel', 'group'=>'starter', 'enabled'=>true, 'version'=>'7.x', 'thumbnail'=>'/images/webapps/laravel-thumb.png' ], |
42 | | - [ 'name'=>'Symfony', 'group'=>'starter', 'enabled'=>true, 'version'=>'4.3.x', 'thumbnail'=>'/images/webapps/symfony-thumb.png' ], |
43 | | -]; |
44 | | - |
45 | 33 | // Check GET request |
46 | 34 | if (!empty($_GET['app'])) { |
47 | 35 | $app = basename($_GET['app']); |
48 | 36 |
|
49 | 37 | $hestia = new \Hestia\System\HestiaApp(); |
50 | | - $app_installer_class = '\Hestia\WebApp\Installers\\' . $app . 'Setup'; |
| 38 | + $app_installer_class = '\Hestia\WebApp\Installers\\'.$app.'\\' . $app . 'Setup'; |
51 | 39 | if(class_exists($app_installer_class)) { |
52 | 40 | try { |
53 | 41 | $app_installer = new $app_installer_class($v_domain, $hestia); |
|
94 | 82 | if(!empty($installer)) { |
95 | 83 | render_page($user, $TAB, 'setup_webapp'); |
96 | 84 | } else { |
| 85 | + $appInstallers = glob(__DIR__.'/../../src/app/WebApp/Installers/*/*.php'); |
| 86 | + $v_web_apps = array(); |
| 87 | + foreach($appInstallers as $app){ |
| 88 | + $hestia = new \Hestia\System\HestiaApp(); |
| 89 | + if( preg_match('/Installers\/([a-zA-Z0-0].*)\/([a-zA-Z0-0].*).php/', $app, $matches)){ |
| 90 | + if ($matches[1] != "Resources"){ |
| 91 | + $app_installer_class = '\Hestia\WebApp\Installers\\'.$matches[1].'\\' . $matches[1] . 'Setup'; |
| 92 | + $app_installer = new $app_installer_class($v_domain, $hestia); |
| 93 | + $v_web_apps[] = $app_installer -> info(); |
| 94 | + |
| 95 | + } |
| 96 | + } |
| 97 | + } |
97 | 98 | render_page($user, $TAB, 'list_webapps'); |
98 | 99 | } |
99 | 100 |
|
|
0 commit comments