N°4761 Fix license.xml content not displayed in setup with multi modules extensions (#261)

For example :
module "mymodule" is in extension "myextension"
On the file system the `license.xml` file will be in `/extensions/myextension/mymodule/license.mymodule.xml`
This form wasn't working in the setup but well displayed in the about box.

When \SetupUtils::GetLicenses was called in the setup it was searching with a GLOB pattern only in one level subfolders. Now we are searching 2 levels.
When called from the console, it is only searching in env-*, where everything is on one level.
This commit is contained in:
Pierre Goiffon
2022-02-08 17:28:47 +01:00
committed by GitHub
parent 3000659e86
commit 25c3704990

View File

@@ -1879,8 +1879,8 @@ JS
if (empty($sEnv))
{
$aLicenceFiles = array_merge($aLicenceFiles, glob(APPROOT.'datamodels/*/*/license.*.xml'));
$aLicenceFiles = array_merge($aLicenceFiles, glob(APPROOT.'extensions/*/license.*.xml'));
$aLicenceFiles = array_merge($aLicenceFiles, glob(APPROOT.'data/*-modules/*/license.*.xml'));
$aLicenceFiles = array_merge($aLicenceFiles, glob(APPROOT.'extensions/{*,*/*}/license.*.xml', GLOB_BRACE));
$aLicenceFiles = array_merge($aLicenceFiles, glob(APPROOT.'data/*-modules/{*,*/*}/license.*.xml', GLOB_BRACE));
}
else
{