]> _ Git - fluidbook-toolbox.git/commitdiff
wait #7215 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 2 Dec 2024 11:22:51 +0000 (12:22 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 2 Dec 2024 11:22:51 +0000 (12:22 +0100)
app/Jobs/HostingUpdate.php

index f3df36298209cb3d0cd82dc65a1a1a5fe3e750fb..d7b3ade4eed053528dbb0abd460d178398ba6b97 100644 (file)
@@ -36,8 +36,12 @@ class HostingUpdate extends Base
 
         copy($r . 'updateall', $d . 'update');
 
-
         foreach ($servers as $server) {
+            $basePath = trim($server->base_path, '/');
+            if ($basePath != '') {
+                $basePath = '/' . $basePath;
+            }
+
             /** @var FluidbookExternalInstallServer $server */
             $server->updateHtaccess();
             $s = $d . 'server-' . $server->id;
@@ -48,7 +52,7 @@ class HostingUpdate extends Base
                 '$dockerpath' => (true || $server->php) ? '/var/www/html' : '/usr/local/apache2/htdocs',
                 '$domains' => implode(',', Text::explodeNewLines($server->subdomains)),
                 '$hosting' => $name,
-                '$path' => $data['basepath'] . $server->base_path,
+                '$path' => $data['basepath'] . $basePath,
             ]);
             $updateAll[] = '/docker/fluidbook-' . $name . '/server-' . $server->id . '/update';
         }