Skip to content
Snippets Groups Projects
Commit ad9af778 authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

Merge branch 'fix/20784/21.03' into '21.03'

[20784] Installation avec un dossier “custom” versionné (21.03)

See merge request maarch/MaarchCourrier!685
parents 9853c284 c28a03eb
No related branches found
No related tags found
No related merge requests found
......@@ -848,18 +848,19 @@ class AuthenticationController
'GET/installer/customs', 'POST/installer/custom', 'POST/installer/database', 'POST/installer/docservers', 'POST/installer/customization',
'PUT/installer/administrator', 'DELETE/installer/lock'
];
$expectedNames = [
'.',
'..',
'custom.json',
'.gitkeep'
];
if (!in_array($args['route'], $installerRoutes)) {
return false;
} elseif (is_file("custom/custom.json")) {
$customs = scandir('custom');
if (count($customs) > 4) {
return false;
}
$customs = array_diff($customs, $expectedNames);
foreach ($customs as $custom) {
if (in_array($custom, ['custom.json', '.', '..'])) {
continue;
}
if (!is_file("custom/{$custom}/initializing.lck")) {
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment