From 4d5530d3d831ee8d08e9ddd3d1200720fc8e7ae6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Aug 2026 02:16:24 +0200 Subject: [PATCH] Debug v24 --- htdocs/admin/remotestore/class/externalModules.class.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/remotestore/class/externalModules.class.php b/htdocs/admin/remotestore/class/externalModules.class.php index 72584d6f63b..b683f3cf7fe 100644 --- a/htdocs/admin/remotestore/class/externalModules.class.php +++ b/htdocs/admin/remotestore/class/externalModules.class.php @@ -574,7 +574,7 @@ class ExternalModules } // Direct install - if (($product['direct-download'] && $product['direct-download'] == 'yes') || $product['source'] === 'dolistore') { + if (($product['direct-download'] && in_array($product['direct-download'], array('yes', 'dolistore'))) || $product['source'] === 'dolistore') { $urldownload = ''; if ($product['source'] === 'githubcommunity') { @@ -591,7 +591,7 @@ class ExternalModules // For community modules, we download from community repo. // But we can force to download from dolistore if MAIN_DOWNLOAD_FROM_DOLISTORE_IN_PRIORITY is set (less reliable, less up to date) - if (getDolGlobalString("MAIN_DOWNLOAD_FROM_DOLISTORE_IN_PRIORITY")) { + if ($product["direct-download"] == 'dolistore' || $product['source'] === 'dolistore' || getDolGlobalString("MAIN_DOWNLOAD_FROM_DOLISTORE_IN_PRIORITY")) { if (preg_match('/https:.*\?id=(\d+)$/', $urlview, $reg)) { $urldownload = 'https://www.dolistore.com/_service_download.php?t=free&p='.$reg[1]; } @@ -698,8 +698,7 @@ class ExternalModules // Price - do not load if display none $html .= ''; $html .= $price; - if (($product['direct-download'] && $product['direct-download'] == 'yes') - || ($product['source'] === 'dolistore' && empty((float) $product['price_ht']))) { + if (($product['direct-download'] && in_array($product['direct-download'], array('yes', 'dolistore'))) || ($product['source'] === 'dolistore' && empty((float) $product['price_ht']))) { if ($install_link) { $html .= $install_link; } @@ -1405,7 +1404,7 @@ class ExternalModules } break; case 'githubcommunity': - if ($producttoinstall['direct-download'] && $producttoinstall['direct-download'] == 'yes') { + if ($producttoinstall['direct-download'] && in_array($producttoinstall['direct-download'], array('yes', 'dolistore'))) { $source_url = 'https://github.com/Dolibarr/dolibarr-community-modules/raw/refs/heads/main/dev/build/bin/module_' . $module_name . '-' . $current_version . '.zip'; $downloaded = $this->_downloadFile($source_url, $tmpdir); if (!$downloaded) {