From ec8f2a420d9aa26f352e2d0109af5d746630261f Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 27 Feb 2024 15:29:58 +0100 Subject: [PATCH] Fix: Use of deprecated fichinter in dynamic modulename (#28456) # Fix: Use of deprecated fichinter in dynamic modulename The modulename is computed dynamically and could use deprecated fichinter module name. Also optimised the test. --- htdocs/api/index.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/api/index.php b/htdocs/api/index.php index 2a9375f58c0..d55fe8d38d5 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -233,12 +233,10 @@ if (!empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $ $modulenameforenabled = $module; if ($module == 'propale') { $modulenameforenabled = 'propal'; - } - if ($module == 'supplierproposal') { + } elseif ($module == 'supplierproposal') { $modulenameforenabled = 'supplier_proposal'; - } - if ($module == 'ficheinter') { - $modulenameforenabled = 'ficheinter'; + } elseif ($module == 'ficheinter') { + $modulenameforenabled = 'intervention'; } dol_syslog("Found module file ".$file." - module=".$module." - modulenameforenabled=".$modulenameforenabled." - moduledirforclass=".$moduledirforclass);