From 356923b3695bd1ef773dd7789da6c04c7ea71394 Mon Sep 17 00:00:00 2001 From: atm-florian Date: Wed, 11 Jan 2023 17:31:37 +0100 Subject: [PATCH] FIX 14.0: move splitting of module:submodule string out of the genallowed condition --- htdocs/core/class/html.formfile.class.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 6fe10788c54..c1438209d5e 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -463,6 +463,15 @@ class FormFile $titletoshow = ($title == 'none' ? '' : $title); } + $submodulepart = $modulepart; + + // modulepart = 'nameofmodule' or 'nameofmodule:NameOfObject' + $tmp = explode(':', $modulepart); + if (!empty($tmp[1])) { + $modulepart = $tmp[0]; + $submodulepart = $tmp[1]; + } + // Show table if ($genallowed) { $modellist = array(); @@ -662,15 +671,6 @@ class FormFile $modellist = ModelePDFUserGroup::liste_modeles($this->db); } } else { - $submodulepart = $modulepart; - - // modulepart = 'nameofmodule' or 'nameofmodule:NameOfObject' - $tmp = explode(':', $modulepart); - if (!empty($tmp[1])) { - $modulepart = $tmp[0]; - $submodulepart = $tmp[1]; - } - // For normalized standard modules $file = dol_buildpath('/core/modules/'.$modulepart.'/modules_'.strtolower($submodulepart).'.php', 0); if (file_exists($file)) {