From d98a44556e95a17b44c6019951e93cf3c57ccf44 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 10 Apr 2008 13:25:39 +0000 Subject: [PATCH] Updated servergeneric -Server move will now be done in the tab object. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10325 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/admin/systems/class_servGeneric.inc | 13 ------------- gosa-plugins/systems/admin/systems/tabs_server.inc | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/gosa-plugins/systems/admin/systems/class_servGeneric.inc b/gosa-plugins/systems/admin/systems/class_servGeneric.inc index 374450777..02f6106a3 100644 --- a/gosa-plugins/systems/admin/systems/class_servGeneric.inc +++ b/gosa-plugins/systems/admin/systems/class_servGeneric.inc @@ -364,19 +364,6 @@ class servgeneric extends plugin new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $mode= "add"; } else { - - /* cn is not case sensitive for ldap, but for php it is!! */ - if($this->config->current['DNMODE'] == "cn"){ - if (strtolower($this->orig_dn) != (strtolower($this->dn))){ - $this->recursive_move($this->orig_dn, $this->dn); - plugin::save(); - } - }else{ - if ($this->orig_dn != $this->dn){ - $this->recursive_move($this->orig_dn, $this->dn); - plugin::save(); - } - } $ldap->cd($this->dn); $this->cleanup(); diff --git a/gosa-plugins/systems/admin/systems/tabs_server.inc b/gosa-plugins/systems/admin/systems/tabs_server.inc index 4255ae711..dfe14489d 100644 --- a/gosa-plugins/systems/admin/systems/tabs_server.inc +++ b/gosa-plugins/systems/admin/systems/tabs_server.inc @@ -69,6 +69,20 @@ class servtabs extends tabs 'dn' to all plugins */ $baseobject= $this->by_object['servgeneric']; $this->dn= "cn=$baseobject->cn,".get_ou('serverou').$baseobject->base; + + /* cn is not case sensitive for ldap, but for php it is!! */ + if($baseobject->orig_dn != "new"){ + if($this->config->current['DNMODE'] == "cn"){ + if (strtolower($baseobject->orig_dn) != (strtolower($this->dn))){ + $baseobject->recursive_move($baseobject->orig_dn, $this->dn); + } + }else{ + if ($baseobject->orig_dn != $this->dn){ + $baseobject->recursive_move($baseobject->orig_dn, $this->dn); + } + } + } + $baseobject->dn= $this->dn; foreach ($this->by_object as $key => $obj){ -- 2.30.2