Code

Allow to search for some special chars in phone reports
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Nov 2009 14:53:54 +0000 (14:53 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Nov 2009 14:53:54 +0000 (14:53 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14735 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/gofon/gofon/fonreports/class_fonreport.inc

index 926355a19819d00246a872652d6b88c99e671a18..bbb6f98ea15f7bd20121675f10eaa206c8531011 100644 (file)
@@ -69,7 +69,7 @@ class fonreport extends plugin
     }
     foreach( array("year", "month", "search_for", "search_base","selected_server") as $type){
       if (isset($_POST[$type])){
-        $this->$type= $_POST[$type];
+        $this->$type= get_post($type);
       }
     }
     
@@ -89,7 +89,7 @@ class fonreport extends plugin
     }
 
     /* remove unwanted tags */
-    $this->search_for = stripslashes(preg_replace("/[^0-9a-z\*\+ \-]/i","",$this->search_for));
+    $this->search_for = stripslashes(preg_replace("/[^0-9a-z\*\+ \-\/]/i","",$this->search_for));
   
     foreach($this->attributes_SO as $name){
       $fonfilter[$name] = $this->$name;
@@ -149,7 +149,7 @@ class fonreport extends plugin
     $smarty->assign("plug",           "?plug=".validate($_GET['plug']));
     $smarty->assign("launchimage",    get_template_path('images/launch.png'));
     $smarty->assign("search_image",   get_template_path('images/lists/search.png'));
-    $smarty->assign("search_for",     $this->search_for);
+    $smarty->assign("search_for",     htmlentities($this->search_for));
     $smarty->assign("bases",          $bases);
     $smarty->assign("base_select",    $this->search_base);
     $smarty->assign("months",         $months);