Code

added check for macro (editing), to have unique name
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Jun 2005 08:08:35 +0000 (08:08 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Jun 2005 08:08:35 +0000 (08:08 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@889 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/macro/class_gofonMacro.inc

index ee480dd6cc58bae20b1d1139676b7537f22b9553..bba2898f7f0c39d5398382de777d39c362c18c7b 100755 (executable)
@@ -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){