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

Fix client choice loader

Guillermo Espinoza 8 éve
szülő
commit
1c50e96e43
1 módosított fájl, 4 hozzáadás és 7 törlés
  1. 4 7
      Form/ChoiceList/Loader/ClientChoiceLoader.php

+ 4 - 7
Form/ChoiceList/Loader/ClientChoiceLoader.php

@@ -137,6 +137,10 @@ class ClientChoiceLoader implements ChoiceLoaderInterface
 
     /**
      * Get first n choices
+     * 
+     * @param string $filter
+     * 
+     * @return array
      */
     public function getChoicesList($filter)
     {
@@ -153,14 +157,7 @@ class ClientChoiceLoader implements ChoiceLoaderInterface
         $filter_len = mb_strlen($filter);
 
         foreach ($choices as $label => $id) {
-            if ($filter_len > 0) {
-                if (mb_substr(mb_strtolower($label), 0, $filter_len) !== $filter) {
-                    continue;
-                }
-            }
-
             $result[$label] = $id;
-
             if (++$cnt >= $limit) {
                 break;
             }