Theme module and them to igfs add
This commit is contained in:
@ -16,6 +16,7 @@ class AdminThemeService
|
||||
|
||||
protected Option $option;
|
||||
protected string $active_theme;
|
||||
|
||||
protected ModuleService $moduleService;
|
||||
|
||||
|
||||
@ -151,7 +152,7 @@ class AdminThemeService
|
||||
|
||||
$fileHelper = new Files();
|
||||
$fileHelper->copy_folder(ROOT_DIR . $path, $tmpThemeDirFull . 'meta/');
|
||||
$fileHelper->copy_folder(RESOURCES_DIR . '/' . $themeName, $tmpThemeDirFull . 'resources/');
|
||||
$fileHelper->copy_folder(RESOURCES_DIR . '/admin_themes/' . $themeName, $tmpThemeDirFull . 'resources/');
|
||||
|
||||
if (!is_dir(RESOURCES_DIR . '/tmp/admin_themes')) {
|
||||
$old_mask = umask(0);
|
||||
@ -193,7 +194,7 @@ class AdminThemeService
|
||||
if (isset($manifest['resource_path'])) {
|
||||
$fileHelper->copy_folder($tmpThemeDirFull . "resources", $manifest['resource_path']);
|
||||
} else {
|
||||
$fileHelper->copy_folder($tmpThemeDirFull . "resources", RESOURCES_DIR . '/' . $manifest['slug']);
|
||||
$fileHelper->copy_folder($tmpThemeDirFull . "resources", RESOURCES_DIR . '/admin_themes/' . $manifest['slug']);
|
||||
}
|
||||
|
||||
$fileHelper->recursiveRemoveDir($tmpThemeDirFull);
|
||||
@ -213,8 +214,8 @@ class AdminThemeService
|
||||
if (file_exists($path)) {
|
||||
$fileHelper->recursiveRemoveDir($path);
|
||||
}
|
||||
if (file_exists(RESOURCES_DIR . '/' . $themeInfo['slug'])) {
|
||||
$fileHelper->recursiveRemoveDir(RESOURCES_DIR . '/' . $themeInfo['slug']);
|
||||
if (file_exists(RESOURCES_DIR . '/admin_themes/' . $themeInfo['slug'])) {
|
||||
$fileHelper->recursiveRemoveDir(RESOURCES_DIR . '/admin_themes/' . $themeInfo['slug']);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user