stanley-king 4 gadi atpakaļ
vecāks
revīzija
a5f86f92bd
1 mainītis faili ar 13 papildinājumiem un 1 dzēšanām
  1. 13 1
      helper/refill/ProviderManager.php

+ 13 - 1
helper/refill/ProviderManager.php

@@ -134,7 +134,7 @@ class ProviderManager
             $name = $item['name'];
             $val = ['name' => $name,
                     'type' => intval($item['type']),
-                    'opened' => (intval($item['opened']) == 1) ? true : false,
+                    'opened' => (intval($item['opened']) == 1),
                     'sort' => intval($item['sort'])];
             $result[$name] = $val;
         }
@@ -145,6 +145,7 @@ class ProviderManager
     public function find_providers(int $spec, int $card_type,int $quality): array
     {
         $qnames = $this->mSpecTypes[$quality] ?? [];
+        $this->debug();
 
         $key = "{$card_type}-{$spec}";
         if(array_key_exists($key,$qnames)) {
@@ -165,6 +166,17 @@ class ProviderManager
         }
     }
 
+    private function debug()
+    {
+        //$this->mSpecTypes[$quality]["{$type}-{$spec}"][] = $name;
+        foreach ($this->mSpecTypes as $quality => $items) {
+            Log::record("quality = {$quality}",Log::DEBUG);
+            foreach ($items as $types_spec => $names) {
+                Log::record("types_spec = {$types_spec}",Log::DEBUG);
+            }
+        }
+    }
+
     public function provider(string $chname)
     {
         if(array_key_exists($chname,$this->mProviders)) {