Procházet zdrojové kódy

fix OtWebsiteRepository::findConfigFileAndContentFor method

Olivier Massot před 6 měsíci
rodič
revize
0fc603c88e
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      ot_core/Classes/Website/OtWebsiteRepository.php

+ 4 - 1
ot_core/Classes/Website/OtWebsiteRepository.php

@@ -445,6 +445,9 @@ class OtWebsiteRepository
             }
         }
 
+        $website = $this->getWebsiteByPageUid($rootUid);
+        $organizationId = $website['organization_id'];
+
         $candidates = array_filter(
             scandir($configs_directory),
             function ($x) { return $x != '.' && $x != '..'; }
@@ -452,7 +455,7 @@ class OtWebsiteRepository
 
         // try to filter by directory name
         foreach ($candidates as $subdir) {
-            if (preg_match('/\.*_' . $rootUid . '$/', $subdir)) {
+            if (preg_match('/\.*_' . $organizationId . '$/', $subdir)) {
                 $filename = $configs_directory . $subdir . '/config.yaml';
                 try {
                     $yamlConfig = Yaml::parseFile($filename);