Skip to content
Snippets Groups Projects
Verified Commit 23e766ff authored by Damien's avatar Damien
Browse files

FEAT #13671 TIME 0:35 Installer last url with custom

parent 589d85ba
No related branches found
No related tags found
No related merge requests found
......@@ -565,6 +565,19 @@ class InstallerController
unlink("custom/{$body['customId']}/initializing.lck");
$url = UrlController::getCoreUrl();
$explodedUrl = explode('/', rtrim($url, '/'));
$lastPart = $explodedUrl[count($explodedUrl) - 1];
$jsonFile = file_get_contents('custom/custom.json');
if (!empty($jsonFile)) {
$jsonFile = json_decode($jsonFile, true);
foreach ($jsonFile as $value) {
if (!empty($value['path']) && $value['path'] == $lastPart) {
$url = str_replace("/{$lastPart}", '', $url);
}
}
}
$url .= $body['customId'] . '/dist/index.html';
return $response->withJson(['url' => $url]);
......
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