Code

Added search str check
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 05:20:20 +0000 (05:20 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 05:20:20 +0000 (05:20 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3393 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/fonreports/class_fonreport.inc

index 47e051b98049b0f17dcb7d7db3b655d26e21bbe0..b0c69931239eb467ad3a173ed40f6c423a5d4dd4 100644 (file)
@@ -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, "<img alt=\"\" src=\"images/sort_".$this->sort_direction.
-        ".png\" border=0 align=middle>");
+    $smarty->assign("mode".$this->sort, "<img alt=\"\" src=\"images/sort_".$this->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);