index 727e46ca6323c56dd31bc052820912aa310e7632..c45d9996d9942dbc4e6437164ab87df35e361605 100644 (file)
$base = $faifilter['branch'];
}
$ldap = $this->config->get_ldap_link();
- $res= get_list("(objectClass=organizationalUnit)", $this->ui->subtreeACL, $base,
- array("cn","description","objectClass"), GL_SIZELIMIT);
- $used = array();
+
+ $res= get_list("(&(objectClass=organizationalUnit)(!(objectClass=FAIbranch)))", $this->ui->subtreeACL, $base,
+ array("cn","description","objectClass"), GL_SIZELIMIT );
$delete = array();
+ $used = array();
foreach($res as $objecttypes){
$res2= get_list("(objectClass=*)", $this->ui->subtreeACL, $objecttypes['dn'],
- array("cn","description","objectClass","FAIclass"), GL_SIZELIMIT | GL_CONVERT);
-
+ array("cn","description","objectClass","FAIclass","FAIstate"), GL_SIZELIMIT | GL_CONVERT );
foreach($res2 as $object){
+
/* skip class names with this name */
if(in_array($this->objectClass,$object['objectClass'])){
+ if(isset($object['FAIstate'][0]) && preg_match("/removed$/",$object['FAIstate'][0])){
+ continue;
+ }
$delete[] = $object['cn'][0];
}
}
}
}
-
+
/* Create headline
* Depending on the object type we want to create, a different headline will be shown
*/