From 30e6c9b83a26598d99e17439efd6519c7955176e Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 13 Feb 2008 06:42:50 +0000 Subject: [PATCH] Updated plugin::move() -Do not try to copy an object if source and destination dn only differ in upper/lowercase. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@8879 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_plugin.inc | 6 ++++++ plugins/admin/systems/class_printGeneric.inc | 2 +- plugins/admin/users/tabs_user.inc | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/class_plugin.inc b/include/class_plugin.inc index 9a25100ff..c02a3b86c 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -792,6 +792,12 @@ class plugin function move($src_dn, $dst_dn) { + + /* Do not copy if only upper- lowercase has changed */ + if(strtolower($src_dn) == strtolower($dst_dn)){ + return(TRUE); + } + /* Copy source to destination */ if (!$this->copy($src_dn, $dst_dn)){ return (FALSE); diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 5b85ad59f..bd476e1b1 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -833,7 +833,7 @@ class printgeneric extends plugin $ldap->add($this->attrs); $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber)); } else { - if (strtolower($this->dn) != strtolower($this->orig_dn)){ + if ($this->dn != $this->orig_dn){ $this->move($this->orig_dn, $this->dn); } diff --git a/plugins/admin/users/tabs_user.inc b/plugins/admin/users/tabs_user.inc index 5620ef066..4b709502c 100644 --- a/plugins/admin/users/tabs_user.inc +++ b/plugins/admin/users/tabs_user.inc @@ -93,7 +93,7 @@ class usertabs extends tabs if ($this->dn != 'new'){ $new_dn= $baseobject->new_dn; - if (strtolower($this->dn) != strtolower($new_dn)){ + if ($this->dn != $new_dn){ $baseobject->move($this->dn, $new_dn); $this->by_object['user']= $baseobject; -- 2.30.2