Forráskód Böngészése

SiteController: fix site config files resolution

Olivier Massot 4 éve
szülő
commit
7b421acc4d
1 módosított fájl, 2 hozzáadás és 1 törlés
  1. 2 1
      ot_admin/Classes/Controller/SiteController.php

+ 2 - 1
ot_admin/Classes/Controller/SiteController.php

@@ -1677,7 +1677,7 @@ class SiteController extends ActionController
 
         // try to filter by directory name
         foreach ($candidates as $subdir) {
-            if (preg_match('/\.*_' . $organizationId . '$/', $subdir)) {
+            if (preg_match('/\.*_' . $rootUid . '$/', $subdir)) {
                 $filename = $configs_directory . $subdir . '/config.yaml';
                 $yamlConfig = Yaml::parseFile($filename);
 
@@ -1689,6 +1689,7 @@ class SiteController extends ActionController
 
         // it wasn't found the easy way, let's look to each file... :(
         foreach ($candidates as $subdir) {
+            $filename = $configs_directory . $subdir . '/config.yaml';
             $yamlConfig = Yaml::parseFile($filename);
             if ($yamlConfig['rootPageId'] === $rootUid) {
                 return [$filename, $yamlConfig];