X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=entry.php;h=b79bc69680ae49bc1ed2ad62b4e66b856eac25e5;hb=c1792e8f272b2fbd5dee54e36b17fb1125031ac0;hp=19b1777367433b3cb25ae927e0d504f6235b90dd;hpb=47b22054a954cdc50c09fa7a768fb6ad58cfab02;p=contagged diff --git a/entry.php b/entry.php index 19b1777..b79bc69 100644 --- a/entry.php +++ b/entry.php @@ -173,6 +173,27 @@ print ''; tpl_ldaperror("mod $key"); } } + + // special tag handling for Thunderbird + if($conf['tbtaghack'] && in_array('contactPerson',$OCLASSES)){ + for($i=1;$i<5;$i++){ + if(empty($entry["custom$i"])){ + // deletion + unset($del); + $del["custom$i"]=array(); + $r = @ldap_mod_replace($LDAP_CON,$dn,$del); + tpl_ldaperror("del custom$i"); + }else{ + // modification + unset($add); + $add["custom$i"]=$entry["custom$i"]; + $r = @ldap_mod_replace($LDAP_CON,$dn,$add); + tpl_ldaperror("mod custom$i"); + } + } + } + + return $dn; } }