Merge pull request #23515 from ATM-Consulting/FIX_14_pdf_download_fails_submodule
FIX 14.0: move splitting of module:submodule string out of condition
This commit is contained in:
commit
15e64c12aa
@ -449,6 +449,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();
|
||||
@ -648,15 +657,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)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user