Code

Renamed 'searchStr' to 'searchStrPKG' to avoid setting the search string on faiManagement
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Oct 2005 05:14:32 +0000 (05:14 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Oct 2005 05:14:32 +0000 (05:14 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1518 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiPackageEntry.inc
plugins/admin/fai/faiPackageEntry.tpl

index 76722a2e107b6c2e8d3fa513e12fed2f517a36b8..dbfd58951c5cecfd32c843729a9972d91b2ce6f5 100644 (file)
@@ -15,7 +15,7 @@ class faiPackageEntry extends plugin
 
   var $buffer       = array();
   var $categories   = array();
-  var $searchStr    = "*";
+  var $searchStrPKG = "Please enter your search string here";
   var $selected     = array();
 
   /* Array with available class names */
@@ -44,16 +44,16 @@ class faiPackageEntry extends plugin
                               array("string"=>"Description","attach"=>"style='border-right:0px;'")));
 
     if(isset($_GET['search'])){
-      $this->searchStr= $_GET['search']."*";
+      $this->searchStrPKG= $_GET['search']."*";
     }
 
     $pkgs = $this->genPkgs();
     foreach($pkgs as $cat => $entries){
       if(!isset($this->categories[$cat])){  
-        $this->categories[$cat] = false;
+        $this->categories[$cat] = true;
       }
       if(isset($_POST['chkchange'])){
-        $this->searchStr = $_POST['searchStr'];
+        $this->searchStrPKG = $_POST['searchStrPKG'];
         if(isset($_POST['CAT'.$cat])){
           $this->categories[$cat]=true;
         }else{
@@ -102,7 +102,7 @@ class faiPackageEntry extends plugin
     }
 
     foreach($packages as $pkg){
-      if(preg_match("/^".str_replace("*",".*",$this->searchStr)."/i",$pkg[0])){
+      if(preg_match("/^".str_replace("*",".*",$this->searchStrPKG)."/i",$pkg[0])){
       if(in_array($pkg[0],$this->selected)){
         $check = " checked ";
       }else{
@@ -118,7 +118,7 @@ class faiPackageEntry extends plugin
     }
 
     $smarty->assign("CHKS"          , $CHKS);
-    $smarty->assign("searchStr"     , $this->searchStr);
+    $smarty->assign("searchStrPKG"  , $this->searchStrPKG);
     $smarty->assign("faihead"       , "");
     $smarty->assign("failist"       , $divlist->DrawList());
     $smarty->assign("infoimage"     , get_template_path('images/info.png'));
index 454e018b9363d826def405c5ccf9652671308256..e2edeff86ea36049aa10ed96c790a23f907dc4b4 100644 (file)
@@ -51,7 +51,7 @@
                                                </LABEL>
                                </td>
                                <td width="99%">
-                                       <input type='text' name='searchStr' maxlength='20' style='width:99%' value='{$searchStr}' id='filter' 
+                                       <input type='text' name='searchStrPKG' maxlength='40' style='width:99%' value='{$searchStrPKG}' id='filter' 
                                             title='{t}Regular expression for matching object names{/t}' onChange="mainform.submit()">
                                </td>
                        </tr>