From: hickert Date: Wed, 17 Jan 2007 09:01:32 +0000 (+0000) Subject: Only save variables, we are able to save. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=46c61112efa6c7e95fc65bcf6b3557573689c5cb;p=gosa.git 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 --- 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);