Commit 0964cb87b5070c7f65816d256153c268b287b2da
1 parent
b9311951
Exists in
master
Corrigido problema nas buscas de campos autocomplete;
portabilis/ieducar#167
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
ieducar/lib/Portabilis/Controller/ApiCoreController.php
@@ -490,7 +490,7 @@ class ApiCoreController extends Core_Controller_Page_EditController | @@ -490,7 +490,7 @@ class ApiCoreController extends Core_Controller_Page_EditController | ||
490 | $selectFields = join(', ', $searchOptions['selectFields']); | 490 | $selectFields = join(', ', $searchOptions['selectFields']); |
491 | 491 | ||
492 | return "select distinct $selectFields from $namespace.$table | 492 | return "select distinct $selectFields from $namespace.$table |
493 | - where $idAttr like $1||'%' order by $idAttr limit 15"; | 493 | + where $idAttr::varchar like $1||'%' order by $idAttr limit 15"; |
494 | } | 494 | } |
495 | 495 | ||
496 | 496 | ||
@@ -506,7 +506,7 @@ class ApiCoreController extends Core_Controller_Page_EditController | @@ -506,7 +506,7 @@ class ApiCoreController extends Core_Controller_Page_EditController | ||
506 | $selectFields = join(', ', $searchOptions['selectFields']); | 506 | $selectFields = join(', ', $searchOptions['selectFields']); |
507 | 507 | ||
508 | return "select distinct $selectFields from $namespace.$table | 508 | return "select distinct $selectFields from $namespace.$table |
509 | - where lower(to_ascii($labelAttr)) like lower(to_ascii($1))||'%' order by $labelAttr limit 15"; | 509 | + where lower($labelAttr) like lower($1)||'%' order by $labelAttr limit 15"; |
510 | } | 510 | } |
511 | 511 | ||
512 | protected function sqlParams($query) { | 512 | protected function sqlParams($query) { |
ieducar/modules/Api/Views/MunicipioController.php
@@ -48,7 +48,7 @@ class MunicipioController extends ApiCoreController | @@ -48,7 +48,7 @@ class MunicipioController extends ApiCoreController | ||
48 | // "<id_municipio> - <nome_municipio> (<sigla_uf>)", ex: "1 - Içara (SC)" | 48 | // "<id_municipio> - <nome_municipio> (<sigla_uf>)", ex: "1 - Içara (SC)" |
49 | protected function formatResourceValue($resource) { | 49 | protected function formatResourceValue($resource) { |
50 | $siglaUf = $resource['sigla_uf']; | 50 | $siglaUf = $resource['sigla_uf']; |
51 | - $nome = $this->toUtf8($resource['name'], array('transform' => true)); | 51 | + $nome = $resource['name']; |
52 | 52 | ||
53 | return $resource['id'] . " - $nome ($siglaUf)"; | 53 | return $resource['id'] . " - $nome ($siglaUf)"; |
54 | } | 54 | } |