fix modules persistence, closes #2

This commit is contained in:
Jean-Christian Paul Denis 2021-10-23 15:17:53 +02:00
parent b957fac722
commit 154506c0bf
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -64,9 +64,6 @@ class dcPackman
return $res;
}
$modules = new dcModules($core);
$themes = new dcThemes($core);
$i = 0;
foreach($zip_files AS $zip_file) {
$zip = new fileUnzip($root . '/' . $zip_file);
@ -87,10 +84,12 @@ class dcPackman
$zip->unzip($define, $cache . '/_define.php');
$modules = new dcModules($core);
$modules->requireDefine($cache, $zip_root_dir);
if ($modules->moduleExists($zip_root_dir)) {
$res[$i] = $modules->getModules($zip_root_dir);
} else {
$themes = new dcThemes($core);
$themes->requireDefine($cache, $zip_root_dir);
$res[$i] = $themes->getModules($zip_root_dir);
}