From 546515cc428e33abee04f399cb043edc8ac1e9bb Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 2 Apr 2008 14:23:10 +0000 Subject: [PATCH] What about saving the entries? git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10119 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/fai/admin/fai/class_faiPackage.inc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc index d76d2dd78..8b1744ebd 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPackage.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPackage.inc @@ -471,17 +471,20 @@ class faiPackage extends plugin } FAI::prepare_to_save_FAI_object($this->dn,$this->attrs); - if (!$ldap->success()){ - msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class())); - } - + $ldap->cd($this->dn); + if($this->initially_was_account){ new log("modify","fai/".get_class($this),$this->dn,$this->attributes); + $ldap->modify($this->attrs); }else{ new log("create","fai/".get_class($this),$this->dn,$this->attributes); + $ldap->add($this->attrs); } - $ldap->cd($this->dn); + if (!$ldap->success()){ + msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class())); + } + /* Save Package configurations */ foreach($this->ConfiguredPackages as $pkgname => $attrs){ @@ -502,8 +505,8 @@ class faiPackage extends plugin $pkgattrs['FAIvariableContent'] = $attr['Value']; $pkgdn = "FAIvariable=".$name.",".$this->dn; - /* Tag object */ - $this->tag_attrs($pkgattrs, $pkgdn, $this->gosaUnitTag); + /* Tag object */ + $this->tag_attrs($pkgattrs, $pkgdn, $this->gosaUnitTag); if(in_array($pkgattrs['FAIvariableType'],array("boolean","multiselect","password","select","string","text"))){ FAI::prepare_to_save_FAI_object($pkgdn,$pkgattrs); -- 2.30.2