From 3f7347f0315ddb04f08c79ff12c8d17057cffd17 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Mon, 6 Sep 2021 23:33:47 +0200 Subject: [PATCH] fix original module name et dc min in dcstore --- inc/lib.improve.action.dcstore.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/inc/lib.improve.action.dcstore.php b/inc/lib.improve.action.dcstore.php index 0ff7410..58e1c13 100644 --- a/inc/lib.improve.action.dcstore.php +++ b/inc/lib.improve.action.dcstore.php @@ -80,7 +80,6 @@ class ImproveActionDcstore extends ImproveAction if (!is_array($module) || empty($module)) { return false; } - $module = Improve::sanitizeModule($id, $module); $xml = ['']; @@ -91,7 +90,7 @@ class ImproveActionDcstore extends ImproveAction $xml[] = sprintf('', html::escapeHTML($module['id'])); # name - if (empty($module['name'])) { + if (empty($module['oname'])) { self::notice(__('unknow module name')); } $xml[] = sprintf('%s', html::escapeHTML($module['name'])); @@ -127,7 +126,18 @@ class ImproveActionDcstore extends ImproveAction } $xml[] = sprintf('%s', html::escapeHTML($file_pattern)); - # da dc_min + # da dc_min or requires core + if (!empty($module['requires']) && is_array($module['requires'])) { + foreach ($module['requires'] as $req) { + if (!is_array($req)) { + $req = [$req]; + } + if ($req[0] == 'core') { + $module['dc_min'] = $req[1]; + break; + } + } + } if (empty($module['dc_min'])) { self::notice(__('no minimum dotclear version'), false); } else {