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

use environment variable

ksieren 3 éve
szülő
commit
a1b0ceb618
1 módosított fájl, 12 hozzáadás és 12 törlés
  1. 12 12
      extensions/mrm_be/Classes/Mongoer.php

+ 12 - 12
extensions/mrm_be/Classes/Mongoer.php

@@ -21,39 +21,39 @@ class Mongoer
     $client = new \MongoDB\Client($_ENV['FE_DATABASE_DSN']);
     $collection = null;
     if($dataType == "pages")
-      $collection = $client->abi_local->pages;
+      $collection = $client->$_ENV['FE_DATABASE']->pages;
 
     if($dataType == "search")
-      $collection = $client->abi_local->searches;
+      $collection = $client->$_ENV['FE_DATABASE']->searches;
 
     if($dataType == "topthemen")
-      $collection = $client->abi_local->topthemens;
+      $collection = $client->$_ENV['FE_DATABASE']->topthemens;
 
     if($dataType == "themaderwoche")
-      $collection = $client->abi_local->themaderwoches;
+      $collection = $client->$_ENV['FE_DATABASE']->themaderwoches;
 
     if($dataType == "security")
-      $collection = $client->abi_local->pagesecurities;
+      $collection = $client->$_ENV['FE_DATABASE']->pagesecurities;
 
     if($dataType == "abialtcache")
-      $collection = $client->abi_local->abialtcaches;
+      $collection = $client->$_ENV['FE_DATABASE']->abialtcaches;
 
     if($dataType == "menues")
-      $collection = $client->abi_local->menues;
+      $collection = $client->$_ENV['FE_DATABASE']->menues;
 
     if($dataType == "maintenance")
-      $collection = $client->abi_local->maintenance;
+      $collection = $client->$_ENV['FE_DATABASE']->maintenance;
 
     if($dataType == "redirects")
-      $collection = $client->abi_local->redirects;
+      $collection = $client->$_ENV['FE_DATABASE']->redirects;
 
     if($dataType == "forwardings") 
-      $collection = $client->abi_local->forwardings;
+      $collection = $client->$_ENV['FE_DATABASE']->forwardings;
     
     if($dataType == "pdfgenjobs") 
-      $collection = $client->abi_local->pdfgenjobs;
+      $collection = $client->$_ENV['FE_DATABASE']->pdfgenjobs;
     if($dataType == "chatbot") 
-      $collection = $client->abi_local->chatbot;
+      $collection = $client->$_ENV['FE_DATABASE']->chatbot;
 
     if(!$collection) return self::log("no collection for senddata: ".$dataType);