Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0

This commit is contained in:
ldestailleur
2025-09-27 15:48:40 +02:00
5 changed files with 41 additions and 24 deletions

View File

@@ -7,6 +7,7 @@
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 Joachim Kueter <git-jk@bloxera.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -250,7 +251,11 @@ if ($type == 'directory') {
$parameters = array('modulepart' => $module);
$reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters);
if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray) > 0) {
$automodules[] = $hookmanager->resArray['module'];
if (is_array($hookmanager->resArray['module'])) {
$automodules = array_merge($automodules, $hookmanager->resArray['module']);
} else {
$automodules[] = $hookmanager->resArray['module'];
}
}
// TODO change for multicompany sharing