From 577efdb77d42077a989742f433296355bcdbdae7 Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 2 Apr 2008 14:48:00 +0000 Subject: [PATCH] Reverted change git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10123 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/fai/admin/fai/class_faiPackage.inc | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc index 8b1744ebd..d76d2dd78 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPackage.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPackage.inc @@ -471,20 +471,17 @@ class faiPackage extends plugin } FAI::prepare_to_save_FAI_object($this->dn,$this->attrs); - $ldap->cd($this->dn); - + if (!$ldap->success()){ + msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class())); + } + 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); } - if (!$ldap->success()){ - msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class())); - } - + $ldap->cd($this->dn); /* Save Package configurations */ foreach($this->ConfiguredPackages as $pkgname => $attrs){ @@ -505,8 +502,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