diff --git a/ieducar/lib/Portabilis/Controller/ApiCoreController.php b/ieducar/lib/Portabilis/Controller/ApiCoreController.php index edae3c5..11487fd 100644 --- a/ieducar/lib/Portabilis/Controller/ApiCoreController.php +++ b/ieducar/lib/Portabilis/Controller/ApiCoreController.php @@ -490,7 +490,7 @@ class ApiCoreController extends Core_Controller_Page_EditController $selectFields = join(', ', $searchOptions['selectFields']); return "select distinct $selectFields from $namespace.$table - where $idAttr like $1||'%' order by $idAttr limit 15"; + where $idAttr::varchar like $1||'%' order by $idAttr limit 15"; } @@ -506,7 +506,7 @@ class ApiCoreController extends Core_Controller_Page_EditController $selectFields = join(', ', $searchOptions['selectFields']); return "select distinct $selectFields from $namespace.$table - where lower(to_ascii($labelAttr)) like lower(to_ascii($1))||'%' order by $labelAttr limit 15"; + where lower($labelAttr) like lower($1)||'%' order by $labelAttr limit 15"; } protected function sqlParams($query) { diff --git a/ieducar/modules/Api/Views/MunicipioController.php b/ieducar/modules/Api/Views/MunicipioController.php index 5465f69..3b6712d 100644 --- a/ieducar/modules/Api/Views/MunicipioController.php +++ b/ieducar/modules/Api/Views/MunicipioController.php @@ -48,7 +48,7 @@ class MunicipioController extends ApiCoreController // " - ()", ex: "1 - Içara (SC)" protected function formatResourceValue($resource) { $siglaUf = $resource['sigla_uf']; - $nome = $this->toUtf8($resource['name'], array('transform' => true)); + $nome = $resource['name']; return $resource['id'] . " - $nome ($siglaUf)"; } -- libgit2 0.21.2