Code

Added http://servername/ppd/ to gotoPrinterPPD
[gosa.git] / plugins / admin / fai / class_faiProfileEntry.inc
index ef83d1c84952c19d0a2251468ba7603e674c51a2..15df8d19078226cdc825c2de22fc650d6ddd6f16 100644 (file)
@@ -62,18 +62,21 @@ class faiProfileEntry extends plugin
     /* If no search filter is set, create one */
     if (!is_global("SUBfaifilter")){
       $SUBfaifilter= array("base" => "ou=fai,ou=configs,ou=systems,".$base, "Sregex" => "*");
-      $SUBfaifilter['SShowTemplates'] = false;
-      $SUBfaifilter['SShowScripts']   = false;
-      $SUBfaifilter['SShowHooks']     = false;
-      $SUBfaifilter['SShowVariables'] = false;
-      $SUBfaifilter['SShowPackages']  = false;
-      $SUBfaifilter['SShowPartitions']= false;
+      $SUBfaifilter['SShowTemplates'] = true;
+      $SUBfaifilter['SShowScripts']   = true;
+      $SUBfaifilter['SShowHooks']     = true;
+      $SUBfaifilter['SShowVariables'] = true;
+      $SUBfaifilter['SShowPackages']  = true;
+      $SUBfaifilter['SShowPartitions']= true;
       register_global("SUBfaifilter", $SUBfaifilter);
     }
   }
 
   function execute()
   {
+       /* Call parent execute */
+       plugin::execute();
+
     /* Fill templating stuff */
     $smarty     = get_smarty();
     $display = "";
@@ -116,7 +119,7 @@ class faiProfileEntry extends plugin
     $objTypes['FAItemplate']        = "<image src='images/fai_template.png' title='"._("Template bundle")."' alt=''>&nbsp;";
     $objTypes['FAIscript']          = "<image src='images/fai_script.png' title='"._("Script bundle")."' alt=''>&nbsp;";
     $objTypes['FAIvariable']        = "<image src='images/fai_variable.png' title='"._("Variable bundle")."' alt=''>&nbsp;";
-    $objTypes['FAIpackages']        = "<image src='images/fai_packages.png' title='"._("Package bundle")."' alt=''>&nbsp;";
+    $objTypes['FAIpackage']        = "<image src='images/fai_packages.png' title='"._("Package bundle")."' alt=''>&nbsp;";
     $objTypes['FAIpartitionTable']  = "<image src='images/fai_partitionTable.png' title='"._("Partition table")."' alt=''>&nbsp;";
 
     /* Magic quotes GPC, escapes every ' " \, to solve some security risks
@@ -146,9 +149,9 @@ class faiProfileEntry extends plugin
     /* Create a divlist to display all available class names with the depending object types */
     $divlist = new divlist("ProfileEntry");
     $divlist->SetSummary(_("This list displays all assigned class names for this profile."));
-    $divlist->SetEntriesPerPage(20);
+    $divlist->SetEntriesPerPage(0);
     $divlist->SetHeader(array(array("string"=>"Class name"),
-                              array("string"=>"Objects")));
+                              array("string"=>"Objects","attach"=>"style='border-right:0px;'")));
 
     /* Action button allows us to delete an entry */
     $action = "<input type='hidden' name='ON_PAGE_%KEY%' value='1'>
@@ -159,27 +162,27 @@ class faiProfileEntry extends plugin
 
       $fi = str_replace("*",".*",$SUBfaifilter['Sregex']);  
  
-      $abort = false; 
+      $abort = true; 
       if(!preg_match("/".$fi."/",$usedClass)){
-        $abort = true;
+        $abort = false;
       }
-      if(($SUBfaifilter['SShowScripts'])&&(!in_array('FAIscript',$classes['objects']))){
-        $abort = true;
+      if((isset($classes['objects']['FAIscript']))&&($SUBfaifilter['SShowScripts'])){
+        $abort = false;
       }
-      if(($SUBfaifilter['SShowTemplates'])&&(!in_array('FAItemplate',$classes['objects']))){
-        $abort = true;
+      if((isset($classes['objects']['FAItemplate']))&&($SUBfaifilter['SShowTemplates'])){
+        $abort = false;
       }
-      if(($SUBfaifilter['SShowHooks'])&&(!in_array('FAIhook',$classes['objects']))){
-        $abort = true;
+      if((isset($classes['objects']['FAIhook']))&&($SUBfaifilter['SShowHooks'])){
+        $abort = false;
       }
-      if(($SUBfaifilter['SShowVariables'])&&(!in_array('FAIvariable',$classes['objects']))){
-        $abort = true;
+      if((isset($classes['objects']['FAIvariable']))&&($SUBfaifilter['SShowVariables'])){
+        $abort = false;
       }
-      if(($SUBfaifilter['SShowPartitions'])&&(!in_array('FAIpartitionTable',$classes['objects']))){
-        $abort = true;
+      if((isset($classes['objects']['FAIpartitionTable']))&&($SUBfaifilter['SShowPartitions'])){
+        $abort = false;
       }
-      if(($SUBfaifilter['SShowPackages'])&&(!in_array('FAIpackages',$classes['objects']))){
-        $abort = true;
+      if((isset($classes['objects']['FAIpackage']))&&($SUBfaifilter['SShowPackages'])){
+        $abort = false;
       }
 
       if(!$abort){
@@ -197,7 +200,7 @@ class faiProfileEntry extends plugin
         
         /* Append to list */
         $field1 = array("string"=> preg_replace("/%KEY%/",$usedClass,$action_check).$usedClass,"attach"=>"");
-        $field2 = array("string"=> $str,"attach"=>"");
+        $field2 = array("string"=> $str,"attach"=>"style='border-right:0px;'");
         $divlist->AddEntry(array($field1,$field2));
       }
     }