mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-12 10:52:48 +00:00
Update Index.php
This commit is contained in:
parent
27caeb3298
commit
e94d59134b
@ -403,10 +403,22 @@ class Index extends BaseInstall
|
|||||||
|
|
||||||
$files = get_files_by_dir($addon_path);
|
$files = get_files_by_dir($addon_path);
|
||||||
if (!empty($files)) {
|
if (!empty($files)) {
|
||||||
|
$addon = [];
|
||||||
foreach ($files as $path) {
|
foreach ($files as $path) {
|
||||||
$data = ( new CoreAddonService() )->getAddonConfig($path);
|
$data = ( new CoreAddonService() )->getAddonConfig($path);
|
||||||
if (isset($data[ 'key' ])) {
|
if (isset($data[ 'key' ])) {
|
||||||
$install_service = ( new CoreAddonInstallService($data[ 'key' ]) );
|
if ($data['type'] == 'app') {
|
||||||
|
$install_service = ( new CoreAddonInstallService($data[ 'key' ]) );
|
||||||
|
$install_service->installCheck();
|
||||||
|
$install_service->install();
|
||||||
|
} else {
|
||||||
|
$addon[] = $data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!empty($addon)) {
|
||||||
|
foreach ($addon as $k => $v) {
|
||||||
|
$install_service = ( new CoreAddonInstallService($v[ 'key' ]) );
|
||||||
$install_service->installCheck();
|
$install_service->installCheck();
|
||||||
$install_service->install();
|
$install_service->install();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user