From 9833d16b5046a04eac12df3293c5e6a3724b49f5 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 28 Jun 2005 08:08:35 +0000 Subject: [PATCH] added check for macro (editing), to have unique name git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@889 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofon/macro/class_gofonMacro.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/gofon/macro/class_gofonMacro.inc b/plugins/gofon/macro/class_gofonMacro.inc index ee480dd6c..bba2898f7 100755 --- a/plugins/gofon/macro/class_gofonMacro.inc +++ b/plugins/gofon/macro/class_gofonMacro.inc @@ -39,6 +39,7 @@ class macro extends plugin $ui= get_userinfo(); $this->base= dn2base($ui->dn); } else { + $this->orig_cn=$this->cn; $this->base= dn2base($this->dn); } } @@ -133,7 +134,7 @@ class macro extends plugin { $message = array(); - if($this->dn=="new"){ + if(($this->dn=="new")||($this->orig_cn!=$this->cn)){ $ldap = $this->config->get_ldap_link(); $ldap->search("(&(objectClass=goFonMacro)(cn=".$this->cn."))",array("cn")); if($ldap->count()>0){ -- 2.30.2