summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1fac73f)
raw | patch | inline | side by side (parent: 1fac73f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Jul 2006 06:32:14 +0000 (06:32 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Jul 2006 06:32:14 +0000 (06:32 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4044 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/fai/class_faiProfile.inc | patch | blob | history |
index 89df309c209943338d5add7aa8fcc2c8f3137ae0..b622f08d6dd60ba955ab1eefd238a886f0371fb8 100644 (file)
{
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->dn);
- $ldap->rmdir_recursive($this->dn);
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of FAI/profile with dn '%s' failed."),$this->dn));
+
+ $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $this->dn);
+ if($_SESSION['faifilter']['branch'] == "main"){
+ $use_dn = $this->dn;
+ }
+
+ prepare_to_save_FAI_object($this->dn,$this->attrs);
$this->handle_post_events("remove");
}
+
/* Save data to object
*/
function save_object()
$this->attrs['FAIclass']=trim($this->FAIclass);
- $ldap->cat($this->dn,array("objectClass"));
- if($ldap->count()!=0){
- /* Write FAIscript to ldap*/
- $ldap->cd($this->dn);
- $this->cleanup();
- $ldap->modify ($this->attrs);
- }else{
- /* Write FAIscript to ldap*/
- $ldap->cd($this->config->current['BASE']);
- $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
- $ldap->cd($this->dn);
- $ldap->add($this->attrs);
- }
+ prepare_to_save_FAI_object($this->dn,$this->attrs);
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/profile with dn '%s' failed."),$this->dn));
/* Do object tagging */