From: hickert Date: Mon, 24 Oct 2005 08:57:25 +0000 (+0000) Subject: Filter in profile selection is OR now X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a76cf74ac42371b5a55e21fcf9c840ab210bad29;p=gosa.git Filter in profile selection is OR now git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1670 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/fai/class_faiProfileEntry.inc b/plugins/admin/fai/class_faiProfileEntry.inc index ef83d1c84..e3216bdb6 100644 --- a/plugins/admin/fai/class_faiProfileEntry.inc +++ b/plugins/admin/fai/class_faiProfileEntry.inc @@ -62,12 +62,12 @@ 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); } } @@ -116,7 +116,7 @@ class faiProfileEntry extends plugin $objTypes['FAItemplate'] = " "; $objTypes['FAIscript'] = " "; $objTypes['FAIvariable'] = " "; - $objTypes['FAIpackages'] = " "; + $objTypes['FAIpackage'] = " "; $objTypes['FAIpartitionTable'] = " "; /* Magic quotes GPC, escapes every ' " \, to solve some security risks @@ -159,27 +159,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){