From 4d5d72cdb5d11a2525fe935044680b0d09df749b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 1 Oct 2025 01:02:21 +0200 Subject: [PATCH] Fix download of zip should be ok if no installmodule.lock file exists --- htdocs/admin/modulehelp.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index c097fa1e843..3175d49ad1f 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -364,8 +364,9 @@ if ($mode == 'desc') { $tmpdirofmoduletoshow = preg_replace('/^'.preg_quote(DOL_DOCUMENT_ROOT, '/').'/', '', (string) $dirofmodule); $textexternal .= '
'.$langs->trans("Origin").': '.$langs->trans("ExternalModule").' - '.$langs->trans("InstalledInto", $tmpdirofmoduletoshow); + $installmoduleslock = DOL_DATA_ROOT.'/installmodules.lock'; global $dolibarr_allow_download_external_modules; - if (!empty($dolibarr_allow_download_external_modules) && preg_match('/\/custom\//', (string) $dirofmodule)) { + if ((!file_exists($installmoduleslock) || !empty($dolibarr_allow_download_external_modules)) && preg_match('/\/custom\//', (string) $dirofmodule)) { // Add a link to download a zip of the module $textexternal .= ' '.img_picto('', 'download').''; }