From 154506c0bf1ea5cd07e5e987e9de89a2168874c4 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 23 Oct 2021 15:17:53 +0200 Subject: [PATCH] fix modules persistence, closes #2 --- inc/class.dc.packman.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/inc/class.dc.packman.php b/inc/class.dc.packman.php index ec9139c..a685fd9 100644 --- a/inc/class.dc.packman.php +++ b/inc/class.dc.packman.php @@ -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); }