From 9dcf89815480870bd7b3104578cf24f6bad2b9f5 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 18 May 2006 05:20:20 +0000 Subject: [PATCH] Added search str check git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3393 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofon/fonreports/class_fonreport.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/gofon/fonreports/class_fonreport.inc b/plugins/gofon/fonreports/class_fonreport.inc index 47e051b98..b0c699312 100644 --- a/plugins/gofon/fonreports/class_fonreport.inc +++ b/plugins/gofon/fonreports/class_fonreport.inc @@ -84,6 +84,9 @@ class fonreport extends plugin $this->sort= 0; } } + + /* remove unwanted tags */ + $this->search_for = stripslashes(preg_replace("/[^0-9a-z]/i","",$this->search_for)); foreach($this->attributes_SO as $name){ $fonfilter[$name] = $this->$name; @@ -257,8 +260,8 @@ class fonreport extends plugin for($i= 0; $i<7; $i++){ $smarty->assign("mode$i", ""); } - $smarty->assign("mode".$this->sort, "\"\"sort_direction. - ".png\" border=0 align=middle>"); + $smarty->assign("mode".$this->sort, "\"\"sort_direction.".png\" border=0 align=middle>"); + return($smarty->fetch(get_template_path('contents.tpl', TRUE))); } @@ -281,6 +284,7 @@ class fonreport extends plugin $ldap = $this->config->get_ldap_link(); $ldap->cd ($this->search_base); $s = $this->search_for; + $s = preg_replace("/\%/","",$s); $s2 = preg_replace("/\*/","%",$s); -- 2.30.2