From 46c61112efa6c7e95fc65bcf6b3557573689c5cb Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 17 Jan 2007 09:01:32 +0000 Subject: [PATCH] Only save variables, we are able to save. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5580 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiPackage.inc | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index 2768e8b40..9e092309b 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -536,19 +536,21 @@ class faiPackage extends plugin if((isset($attrs['objectClass'])) && (in_array_ics("gosaAdministrativeUnitTag",$attrs['objectClass']))){ $pkgattrs['objectClass'][] = "gosaAdministrativeUnitTag"; } - - if($ldap->count()!=0){ - $ldap->cd($pkgdn); - $this->cleanup(); - $ldap->modify ($pkgattrs); + + if(in_array($pkgattrs['FAIvariableType'],array("boolean","multiselect","password","select","string","text"))){ + if($ldap->count()!=0){ + $ldap->cd($pkgdn); + $this->cleanup(); + $ldap->modify ($pkgattrs); - }else{ - $ldap->cd($this->config->current['BASE']); - $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $pkgdn)); - $ldap->cd($pkgdn); - $ldap->add($pkgattrs); + }else{ + $ldap->cd($this->config->current['BASE']); + $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $pkgdn)); + $ldap->cd($pkgdn); + $ldap->add($pkgattrs); + } + show_ldap_error($ldap->get_error(), _("Saving FAI package entry failed")); } - show_ldap_error($ldap->get_error(), _("Saving FAI package entry failed")); /* Handle tagging */ $this->handle_object_tagging($pkgdn, $this->gosaUnitTag); -- 2.30.2