summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 22f2e09)
raw | patch | inline | side by side (parent: 22f2e09)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 18 Sep 2006 06:27:48 +0000 (06:27 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 18 Sep 2006 06:27:48 +0000 (06:27 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4702 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/fai/class_faiPackage.inc | patch | blob | history |
index 67f5c66668c270ee3182319e75690852fc79583e..d2fe6bac321db3ae79789cea38e31bdb74b915f7 100644 (file)
}
- /* Create one filter with all package names,
- instead of calling $ldap->search for every single package
- */
- $PackageFilter = "";
- foreach($this->usedPackages as $name){
- $PackageFilter .= "(FAIpackage=".$name.")";
- }
- $PackageFilter = "(&(objectClass=FAIdebconfInfo)(|".$PackageFilter."))";
-
- /* Search for configuration objects */
- $ldap = $this->config->get_ldap_link();
- $ldap->search($PackageFilter,array("FAIvariable","FAIvariableType","FAIvariableContent","FAIpackage","FAIdebianSection"));
+ if($dn != "new"){
- /* Walk through configurations and append them to our list of ConfiguredPackages */
- while($attr = $ldap->fetch()){
- $tmp =array();
- $tmp['Name'] = $attr['FAIvariable'][0];
- $tmp['Type'] = $attr['FAIvariableType'][0];
+ /* Create one filter with all package names,
+ instead of calling $ldap->search for every single package
+ */
+ $PackageFilter = "";
+ foreach($this->usedPackages as $name){
+ $PackageFilter .= "(FAIpackage=".$name.")";
+ }
+ $PackageFilter = "(&(objectClass=FAIdebconfInfo)(|".$PackageFilter."))";
- if (isset($attr['FAIvariableContent'][0])){
- if(!in_array($attr['FAIvariableType'],array("multiselect"))){
- $tmp['Value'] = $attr['FAIvariableContent'][0];
- }else{
- $content = array();
- unset($attr['FAIvariableContent']['count']);
- foreach($attr['FAIvariableContent'] as $attr){
- $tmp['Value'][] = $attr;
+ /* Search for configuration objects */
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->dn);
+ $ldap->search($PackageFilter,array("FAIvariable","FAIvariableType","FAIvariableContent","FAIpackage","FAIdebianSection"));
+
+ /* Walk through configurations and append them to our list of ConfiguredPackages */
+ while($attr = $ldap->fetch()){
+ $tmp =array();
+ $tmp['Name'] = $attr['FAIvariable'][0];
+ $tmp['Type'] = $attr['FAIvariableType'][0];
+
+ if (isset($attr['FAIvariableContent'][0])){
+ if(!in_array($attr['FAIvariableType'],array("multiselect"))){
+ $tmp['Value'] = $attr['FAIvariableContent'][0];
+ }else{
+ $content = array();
+ unset($attr['FAIvariableContent']['count']);
+ foreach($attr['FAIvariableContent'] as $attr){
+ $tmp['Value'][] = $attr;
+ }
}
+ $this->ConfiguredPackages[$attr['FAIpackage'][0]][$attr['FAIvariable'][0]]=$tmp;
}
- $this->ConfiguredPackages[$attr['FAIpackage'][0]][$attr['FAIvariable'][0]]=$tmp;
}
}