index 0c4fa51df2effc68ff5c0c9a0b2c13b199f3a09a..8de436e3a7a23ad1b1d037305a8b40c6a43ccf8f 100644 (file)
$ldap->search("(&(objectClass=FAIclass)(objectClass=".$this->subClass."))",$attrs_to_search);
while($object = $ldap->fetch()){
+
+ /* Skip objects, that are tagged as removed */
+ if(isset($object['FAIstate'][0])){
+ if(preg_match("/removed$/",$object['FAIstate'][0])){
+ continue;
+ }
+ }
+
/* Set status for save management */
$objects = array();
$objects['status'] = "FreshLoaded";
$objects = $this->get_object_attributes($objects,$this->subAttributes);
$this->SubObjects[$objects['cn']] = $objects;
}
+
+ @log::log("view","fai/".get_class($this),$this->dn);
}
$this->ui = get_userinfo();
}
$acl_dn = $this->acl_base_for_current_object($obj['dn']);
$acl = $this->ui->get_permissions($acl_dn,"fai/faiTemplateEntry");
if(preg_match("/d/",$acl)){
- if(($this->SubObjects[$entry]['status'] == "edited")||($this->SubObjects[$entry]['status'] == "FreshLoaded")){
+ $status = $this->SubObjects[$entry]['status'];
+ if($status == "edited" || $status == "FreshLoaded"){
$this->SubObjects[$entry]['status']= "delete";
}else{
unset($this->SubObjects[$entry]);
$tmp = $this->getList(true);
+ /* Create div list with all sub entries listed */
foreach($this->SubObjects as $key => $name){
+ /* Skip removed entries */
+ if($name['status'] == "delete") continue;
+
+ /* Get permissions */
$dn = $this->acl_base_for_current_object($name['dn']);
$acl = $this->ui->get_permissions($dn,"fai/faiTemplateEntry") ;
$act = "";
}
prepare_to_save_FAI_object($use_dn,array(),true);
+ @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes);
foreach($this->SubObjects as $name => $obj){
# $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $obj['dn']);
prepare_to_save_FAI_object($this->dn,$this->attrs);
show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/template with dn '%s' failed."),$this->dn));
+ if($this->initially_was_account){
+ @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes);
+ }else{
+ @log::log("create","fai/".get_class($this),$this->dn,$this->attributes);
+ }
+
/* Do object tagging */
$this->handle_object_tagging();