Commit fcd1aa92978f0492a656812d7657cd8030eb3b34
1 parent
d91a0079
Exists in
master
and in
7 other branches
correção na busca de temas (havia problemas com acentuação)
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
admin/php/classe_arvore.php
| ... | ... | @@ -94,15 +94,18 @@ class Arvore |
| 94 | 94 | $t = $t[0]; |
| 95 | 95 | $nome = $this->removeAcentos($tema["nome_tema"]); |
| 96 | 96 | $tags = $this->removeAcentos($tema["tags_tema"]); |
| 97 | + $tags1 = $this->removeAcentos(mb_convert_encoding($tema["tags_tema"],"ISO-8859-1","UTF-8")); | |
| 98 | + $nome1 = $this->removeAcentos(mb_convert_encoding($tema["nome_tema"],"ISO-8859-1","UTF-8")); | |
| 99 | + | |
| 97 | 100 | $down = "sim"; |
| 98 | 101 | if (strtolower($t["download_tema"]) == "nao") |
| 99 | 102 | {$down = "nao";} |
| 100 | 103 | $texto = array("tid"=>$tema["codigo_tema"],"nome"=>$this->converte($tema["nome_tema"]),"link"=>$t["link_tema"],"download"=>$down); |
| 101 | - if (stristr($nome,$procurar)) | |
| 104 | + if (stristr($nome,$procurar) || stristr($nome1,$procurar)) | |
| 102 | 105 | {$resultado[] = $texto;} |
| 103 | 106 | else |
| 104 | 107 | { |
| 105 | - if (stristr($tags,$procurar)) | |
| 108 | + if (stristr($tags,$procurar) || stristr($tags1,$procurar)) | |
| 106 | 109 | {$resultado[] = $texto;} |
| 107 | 110 | } |
| 108 | 111 | } | ... | ... |