From fcd1aa92978f0492a656812d7657cd8030eb3b34 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Thu, 10 Dec 2009 16:29:34 +0000 Subject: [PATCH] correção na busca de temas (havia problemas com acentuação) --- admin/php/classe_arvore.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/admin/php/classe_arvore.php b/admin/php/classe_arvore.php index 988b79e..2e0a8ef 100644 --- a/admin/php/classe_arvore.php +++ b/admin/php/classe_arvore.php @@ -94,15 +94,18 @@ class Arvore $t = $t[0]; $nome = $this->removeAcentos($tema["nome_tema"]); $tags = $this->removeAcentos($tema["tags_tema"]); + $tags1 = $this->removeAcentos(mb_convert_encoding($tema["tags_tema"],"ISO-8859-1","UTF-8")); + $nome1 = $this->removeAcentos(mb_convert_encoding($tema["nome_tema"],"ISO-8859-1","UTF-8")); + $down = "sim"; if (strtolower($t["download_tema"]) == "nao") {$down = "nao";} $texto = array("tid"=>$tema["codigo_tema"],"nome"=>$this->converte($tema["nome_tema"]),"link"=>$t["link_tema"],"download"=>$down); - if (stristr($nome,$procurar)) + if (stristr($nome,$procurar) || stristr($nome1,$procurar)) {$resultado[] = $texto;} else { - if (stristr($tags,$procurar)) + if (stristr($tags,$procurar) || stristr($tags1,$procurar)) {$resultado[] = $texto;} } } -- libgit2 0.21.2