X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_plugin.inc;h=e33b2ec613feebaad84cdcd40bb6e3b1060ac42f;hb=b4517f3f06a0f04435fd4f889c04f946de8f3e45;hp=346699bad1097b73fc8fb4655b2598460299b984;hpb=16a4e977a2e92a5e07bb35fc880931904f587872;p=gosa.git diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index 346699bad..e33b2ec61 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -111,10 +111,6 @@ class plugin var $acl_base= ""; var $acl_category= ""; - /* Plugin identifier */ - var $plHeadline= ""; - var $plDescription= ""; - /* This can be set to render the tabulators in another stylesheet */ var $pl_notify= FALSE; @@ -216,7 +212,7 @@ class plugin unset($this->saved_attributes[$index]); continue; } - if ($this->saved_attributes[$index]["count"] == 1){ + if (isset($this->saved_attributes[$index][0]) || $this->saved_attributes[$index]["count"] == 1){ $tmp= $this->saved_attributes[$index][0]; unset($this->saved_attributes[$index]); $this->saved_attributes[$index]= $tmp; @@ -318,9 +314,6 @@ class plugin $data = ""; } $this->$val= $data; - //echo "".$val."
"; - }else{ - //echo "".$val."
"; } } } @@ -824,7 +817,7 @@ class plugin { /* Rename dn in possible object groups */ $ldap= $this->config->get_ldap_link(); - $ldap->search('(&(objectClass=gosaGroupOfNames)(member='.@LDAP::preapre4filter($src_dn).'))', + $ldap->search('(&(objectClass=gosaGroupOfNames)(member='.@LDAP::prepare4filter($src_dn).'))', array('cn')); while ($attrs= $ldap->fetch()){ $og= new ogroup($this->config, $ldap->getDN()); @@ -862,6 +855,11 @@ 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); @@ -976,14 +974,11 @@ class plugin $tmp = $source[$var][$i]; } $this->$var = $tmp; -# echo $var."=".$tmp."
"; }else{ $this->$var = $source[$var][0]; -# echo $var."=".$source[$var][0]."
"; } }else{ $this->$var= $source[$var]; -# echo $var."=".$source[$var]."
"; } } } @@ -1518,12 +1513,12 @@ class plugin if(isset($this->base) && isset($this->config->idepartments[$this->base])){ $deps[$this->base] = $this->config->idepartments[$this->base]; }else{ - echo "No default base found. ".$this->base."
"; + trigger_error("No default base found in class ".get_class($this).". ".$this->base); } - return($deps); } + /* This function modifies object acls too, if an object is moved. * $old_dn specifies the actually used dn * $new_dn specifies the destiantion dn @@ -1601,14 +1596,10 @@ class plugin /* Acls for this object must be adjusted */ if($found){ - if($output_changes){ - echo "". - _("Changing ACL dn")." : 
 -"._("from")."  ". - $old_dn. - "
 -"._("to")." ". - $new_dn. - "

"; - } + $debug_info= _("Changing ACL dn")." : 
 -"._("from")."  ". + $old_dn."
 -"._("to")." ".$new_dn."
"; + @DEBUG (DEBUG_ACL, __LINE__, __FUNCTION__, __FILE__,$debug_info,"ACL"); + $update[$attrs['dn']] =array(); foreach($acls as $acl){ $update[$attrs['dn']]['gosaAclEntry'][] = $acl;